Toniolo and Linder, Equation (10+)

Percentage Accurate: 55.2% → 92.8%
Time: 18.4s
Alternatives: 19
Speedup: 1.9×

Specification

?
\[\begin{array}{l} \\ \frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \end{array} \]
(FPCore (t l k)
 :precision binary64
 (/
  2.0
  (*
   (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k))
   (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
	return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
real(8) function code(t, l, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
end function
public static double code(double t, double l, double k) {
	return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
}
def code(t, l, k):
	return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) + 1.0))
function code(t, l, k)
	return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) + 1.0)))
end
function tmp = code(t, l, k)
	tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0));
end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}
\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 19 alternatives:

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

Initial Program: 55.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \end{array} \]
(FPCore (t l k)
 :precision binary64
 (/
  2.0
  (*
   (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k))
   (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
	return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
real(8) function code(t, l, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
end function
public static double code(double t, double l, double k) {
	return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
}
def code(t, l, k):
	return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) + 1.0))
function code(t, l, k)
	return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) + 1.0)))
end
function tmp = code(t, l, k)
	tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0));
end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}
\end{array}

Alternative 1: 92.8% accurate, 0.5× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 2.5 \cdot 10^{-35}:\\ \;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t\_m}{\cos k}}\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t\_m \cdot \sqrt[3]{\sin k}} \cdot \frac{\sqrt[3]{2}}{\sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)}}\right)}^{3}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 2.5e-35)
    (/ 2.0 (* (pow (* k (/ (sin k) l)) 2.0) (/ t_m (cos k))))
    (pow
     (*
      (/ (pow (cbrt l) 2.0) (* t_m (cbrt (sin k))))
      (/ (cbrt 2.0) (cbrt (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0))))))
     3.0))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 2.5e-35) {
		tmp = 2.0 / (pow((k * (sin(k) / l)), 2.0) * (t_m / cos(k)));
	} else {
		tmp = pow(((pow(cbrt(l), 2.0) / (t_m * cbrt(sin(k)))) * (cbrt(2.0) / cbrt((tan(k) * (2.0 + pow((k / t_m), 2.0)))))), 3.0);
	}
	return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 2.5e-35) {
		tmp = 2.0 / (Math.pow((k * (Math.sin(k) / l)), 2.0) * (t_m / Math.cos(k)));
	} else {
		tmp = Math.pow(((Math.pow(Math.cbrt(l), 2.0) / (t_m * Math.cbrt(Math.sin(k)))) * (Math.cbrt(2.0) / Math.cbrt((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0)))))), 3.0);
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 2.5e-35)
		tmp = Float64(2.0 / Float64((Float64(k * Float64(sin(k) / l)) ^ 2.0) * Float64(t_m / cos(k))));
	else
		tmp = Float64(Float64((cbrt(l) ^ 2.0) / Float64(t_m * cbrt(sin(k)))) * Float64(cbrt(2.0) / cbrt(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0)))))) ^ 3.0;
	end
	return Float64(t_s * tmp)
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2.5e-35], N[(2.0 / N[(N[Power[N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[2.0, 1/3], $MachinePrecision] / N[Power[N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.5 \cdot 10^{-35}:\\
\;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t\_m}{\cos k}}\\

\mathbf{else}:\\
\;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t\_m \cdot \sqrt[3]{\sin k}} \cdot \frac{\sqrt[3]{2}}{\sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)}}\right)}^{3}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 2.49999999999999982e-35

    1. Initial program 40.3%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified40.3%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr20.5%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Taylor expanded in t around 0 40.2%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]
    6. Step-by-step derivation
      1. unpow-prod-down37.2%

        \[\leadsto \frac{2}{\color{blue}{{\left(\frac{k \cdot \sin k}{\ell}\right)}^{2} \cdot {\left(\sqrt{\frac{t}{\cos k}}\right)}^{2}}} \]
      2. associate-/l*37.2%

        \[\leadsto \frac{2}{{\color{blue}{\left(k \cdot \frac{\sin k}{\ell}\right)}}^{2} \cdot {\left(\sqrt{\frac{t}{\cos k}}\right)}^{2}} \]
      3. pow237.2%

        \[\leadsto \frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \color{blue}{\left(\sqrt{\frac{t}{\cos k}} \cdot \sqrt{\frac{t}{\cos k}}\right)}} \]
      4. add-sqr-sqrt74.8%

        \[\leadsto \frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \color{blue}{\frac{t}{\cos k}}} \]
    7. Applied egg-rr74.8%

      \[\leadsto \frac{2}{\color{blue}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t}{\cos k}}} \]

    if 2.49999999999999982e-35 < t

    1. Initial program 63.7%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified53.9%

      \[\leadsto \color{blue}{\frac{\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \left(\ell \cdot \ell\right)}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*l/53.9%

        \[\leadsto \frac{\color{blue}{\frac{2 \cdot \left(\ell \cdot \ell\right)}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)}}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      2. pow253.9%

        \[\leadsto \frac{\frac{2 \cdot \color{blue}{{\ell}^{2}}}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    5. Applied egg-rr53.9%

      \[\leadsto \frac{\color{blue}{\frac{2 \cdot {\ell}^{2}}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)}}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    6. Step-by-step derivation
      1. associate-/r*53.9%

        \[\leadsto \frac{\color{blue}{\frac{\frac{2 \cdot {\ell}^{2}}{{t}^{3}}}{\sin k \cdot \tan k}}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      2. associate-*r/53.9%

        \[\leadsto \frac{\frac{\color{blue}{2 \cdot \frac{{\ell}^{2}}{{t}^{3}}}}{\sin k \cdot \tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      3. *-commutative53.9%

        \[\leadsto \frac{\frac{\color{blue}{\frac{{\ell}^{2}}{{t}^{3}} \cdot 2}}{\sin k \cdot \tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      4. times-frac63.6%

        \[\leadsto \frac{\color{blue}{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k} \cdot \frac{2}{\tan k}}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    7. Simplified63.6%

      \[\leadsto \frac{\color{blue}{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k} \cdot \frac{2}{\tan k}}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    8. Step-by-step derivation
      1. add-cube-cbrt63.5%

        \[\leadsto \frac{\color{blue}{\left(\left(\sqrt[3]{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k}} \cdot \sqrt[3]{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k}}\right) \cdot \sqrt[3]{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k}}\right)} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      2. pow363.5%

        \[\leadsto \frac{\color{blue}{{\left(\sqrt[3]{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k}}\right)}^{3}} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      3. cbrt-div63.3%

        \[\leadsto \frac{{\color{blue}{\left(\frac{\sqrt[3]{\frac{{\ell}^{2}}{{t}^{3}}}}{\sqrt[3]{\sin k}}\right)}}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      4. cbrt-div64.6%

        \[\leadsto \frac{{\left(\frac{\color{blue}{\frac{\sqrt[3]{{\ell}^{2}}}{\sqrt[3]{{t}^{3}}}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      5. unpow264.6%

        \[\leadsto \frac{{\left(\frac{\frac{\sqrt[3]{\color{blue}{\ell \cdot \ell}}}{\sqrt[3]{{t}^{3}}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      6. cbrt-prod70.2%

        \[\leadsto \frac{{\left(\frac{\frac{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}{\sqrt[3]{{t}^{3}}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      7. unpow270.2%

        \[\leadsto \frac{{\left(\frac{\frac{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{{t}^{3}}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      8. unpow370.2%

        \[\leadsto \frac{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\color{blue}{\left(t \cdot t\right) \cdot t}}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      9. add-cbrt-cube87.5%

        \[\leadsto \frac{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\color{blue}{t}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    9. Applied egg-rr87.5%

      \[\leadsto \frac{\color{blue}{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\sqrt[3]{\sin k}}\right)}^{3}} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    10. Step-by-step derivation
      1. add-cube-cbrt87.4%

        \[\leadsto \color{blue}{\left(\sqrt[3]{\frac{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}}} \cdot \sqrt[3]{\frac{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}}}\right) \cdot \sqrt[3]{\frac{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}}}} \]
      2. pow387.4%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}}}\right)}^{3}} \]
    11. Applied egg-rr92.1%

      \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\sin k} \cdot t} \cdot \sqrt[3]{\frac{\frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}}}\right)}^{3}} \]
    12. Step-by-step derivation
      1. associate-/l/92.2%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\sin k} \cdot t} \cdot \sqrt[3]{\color{blue}{\frac{2}{\left(2 + {\left(\frac{k}{t}\right)}^{2}\right) \cdot \tan k}}}\right)}^{3} \]
      2. *-commutative92.2%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\sin k} \cdot t} \cdot \sqrt[3]{\frac{2}{\color{blue}{\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)}}}\right)}^{3} \]
      3. metadata-eval92.2%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\sin k} \cdot t} \cdot \sqrt[3]{\frac{2}{\tan k \cdot \left(\color{blue}{\left(1 + 1\right)} + {\left(\frac{k}{t}\right)}^{2}\right)}}\right)}^{3} \]
      4. associate-+r+92.2%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\sin k} \cdot t} \cdot \sqrt[3]{\frac{2}{\tan k \cdot \color{blue}{\left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}}}\right)}^{3} \]
      5. cbrt-div93.3%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\sin k} \cdot t} \cdot \color{blue}{\frac{\sqrt[3]{2}}{\sqrt[3]{\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}}}\right)}^{3} \]
      6. associate-+r+93.3%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\sin k} \cdot t} \cdot \frac{\sqrt[3]{2}}{\sqrt[3]{\tan k \cdot \color{blue}{\left(\left(1 + 1\right) + {\left(\frac{k}{t}\right)}^{2}\right)}}}\right)}^{3} \]
      7. metadata-eval93.3%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\sin k} \cdot t} \cdot \frac{\sqrt[3]{2}}{\sqrt[3]{\tan k \cdot \left(\color{blue}{2} + {\left(\frac{k}{t}\right)}^{2}\right)}}\right)}^{3} \]
    13. Applied egg-rr93.3%

      \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\sin k} \cdot t} \cdot \color{blue}{\frac{\sqrt[3]{2}}{\sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)}}}\right)}^{3} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification80.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 2.5 \cdot 10^{-35}:\\ \;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t}{\cos k}}\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{\sin k}} \cdot \frac{\sqrt[3]{2}}{\sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)}}\right)}^{3}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 92.8% accurate, 0.5× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 2.3 \cdot 10^{-35}:\\ \;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t\_m}{\cos k}}\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t\_m \cdot \sqrt[3]{\sin k}} \cdot \frac{1}{\sqrt[3]{\frac{2 + {\left(\frac{k}{t\_m}\right)}^{2}}{\frac{2}{\tan k}}}}\right)}^{3}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 2.3e-35)
    (/ 2.0 (* (pow (* k (/ (sin k) l)) 2.0) (/ t_m (cos k))))
    (pow
     (*
      (/ (pow (cbrt l) 2.0) (* t_m (cbrt (sin k))))
      (/ 1.0 (cbrt (/ (+ 2.0 (pow (/ k t_m) 2.0)) (/ 2.0 (tan k))))))
     3.0))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 2.3e-35) {
		tmp = 2.0 / (pow((k * (sin(k) / l)), 2.0) * (t_m / cos(k)));
	} else {
		tmp = pow(((pow(cbrt(l), 2.0) / (t_m * cbrt(sin(k)))) * (1.0 / cbrt(((2.0 + pow((k / t_m), 2.0)) / (2.0 / tan(k)))))), 3.0);
	}
	return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 2.3e-35) {
		tmp = 2.0 / (Math.pow((k * (Math.sin(k) / l)), 2.0) * (t_m / Math.cos(k)));
	} else {
		tmp = Math.pow(((Math.pow(Math.cbrt(l), 2.0) / (t_m * Math.cbrt(Math.sin(k)))) * (1.0 / Math.cbrt(((2.0 + Math.pow((k / t_m), 2.0)) / (2.0 / Math.tan(k)))))), 3.0);
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 2.3e-35)
		tmp = Float64(2.0 / Float64((Float64(k * Float64(sin(k) / l)) ^ 2.0) * Float64(t_m / cos(k))));
	else
		tmp = Float64(Float64((cbrt(l) ^ 2.0) / Float64(t_m * cbrt(sin(k)))) * Float64(1.0 / cbrt(Float64(Float64(2.0 + (Float64(k / t_m) ^ 2.0)) / Float64(2.0 / tan(k)))))) ^ 3.0;
	end
	return Float64(t_s * tmp)
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2.3e-35], N[(2.0 / N[(N[Power[N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[Power[N[(N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.3 \cdot 10^{-35}:\\
\;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t\_m}{\cos k}}\\

\mathbf{else}:\\
\;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t\_m \cdot \sqrt[3]{\sin k}} \cdot \frac{1}{\sqrt[3]{\frac{2 + {\left(\frac{k}{t\_m}\right)}^{2}}{\frac{2}{\tan k}}}}\right)}^{3}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 2.2999999999999999e-35

    1. Initial program 40.3%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified40.3%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr20.5%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Taylor expanded in t around 0 40.2%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]
    6. Step-by-step derivation
      1. unpow-prod-down37.2%

        \[\leadsto \frac{2}{\color{blue}{{\left(\frac{k \cdot \sin k}{\ell}\right)}^{2} \cdot {\left(\sqrt{\frac{t}{\cos k}}\right)}^{2}}} \]
      2. associate-/l*37.2%

        \[\leadsto \frac{2}{{\color{blue}{\left(k \cdot \frac{\sin k}{\ell}\right)}}^{2} \cdot {\left(\sqrt{\frac{t}{\cos k}}\right)}^{2}} \]
      3. pow237.2%

        \[\leadsto \frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \color{blue}{\left(\sqrt{\frac{t}{\cos k}} \cdot \sqrt{\frac{t}{\cos k}}\right)}} \]
      4. add-sqr-sqrt74.8%

        \[\leadsto \frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \color{blue}{\frac{t}{\cos k}}} \]
    7. Applied egg-rr74.8%

      \[\leadsto \frac{2}{\color{blue}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t}{\cos k}}} \]

    if 2.2999999999999999e-35 < t

    1. Initial program 63.7%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified53.9%

      \[\leadsto \color{blue}{\frac{\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \left(\ell \cdot \ell\right)}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*l/53.9%

        \[\leadsto \frac{\color{blue}{\frac{2 \cdot \left(\ell \cdot \ell\right)}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)}}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      2. pow253.9%

        \[\leadsto \frac{\frac{2 \cdot \color{blue}{{\ell}^{2}}}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    5. Applied egg-rr53.9%

      \[\leadsto \frac{\color{blue}{\frac{2 \cdot {\ell}^{2}}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)}}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    6. Step-by-step derivation
      1. associate-/r*53.9%

        \[\leadsto \frac{\color{blue}{\frac{\frac{2 \cdot {\ell}^{2}}{{t}^{3}}}{\sin k \cdot \tan k}}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      2. associate-*r/53.9%

        \[\leadsto \frac{\frac{\color{blue}{2 \cdot \frac{{\ell}^{2}}{{t}^{3}}}}{\sin k \cdot \tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      3. *-commutative53.9%

        \[\leadsto \frac{\frac{\color{blue}{\frac{{\ell}^{2}}{{t}^{3}} \cdot 2}}{\sin k \cdot \tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      4. times-frac63.6%

        \[\leadsto \frac{\color{blue}{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k} \cdot \frac{2}{\tan k}}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    7. Simplified63.6%

      \[\leadsto \frac{\color{blue}{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k} \cdot \frac{2}{\tan k}}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    8. Step-by-step derivation
      1. add-cube-cbrt63.5%

        \[\leadsto \frac{\color{blue}{\left(\left(\sqrt[3]{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k}} \cdot \sqrt[3]{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k}}\right) \cdot \sqrt[3]{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k}}\right)} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      2. pow363.5%

        \[\leadsto \frac{\color{blue}{{\left(\sqrt[3]{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k}}\right)}^{3}} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      3. cbrt-div63.3%

        \[\leadsto \frac{{\color{blue}{\left(\frac{\sqrt[3]{\frac{{\ell}^{2}}{{t}^{3}}}}{\sqrt[3]{\sin k}}\right)}}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      4. cbrt-div64.6%

        \[\leadsto \frac{{\left(\frac{\color{blue}{\frac{\sqrt[3]{{\ell}^{2}}}{\sqrt[3]{{t}^{3}}}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      5. unpow264.6%

        \[\leadsto \frac{{\left(\frac{\frac{\sqrt[3]{\color{blue}{\ell \cdot \ell}}}{\sqrt[3]{{t}^{3}}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      6. cbrt-prod70.2%

        \[\leadsto \frac{{\left(\frac{\frac{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}{\sqrt[3]{{t}^{3}}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      7. unpow270.2%

        \[\leadsto \frac{{\left(\frac{\frac{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{{t}^{3}}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      8. unpow370.2%

        \[\leadsto \frac{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\color{blue}{\left(t \cdot t\right) \cdot t}}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      9. add-cbrt-cube87.5%

        \[\leadsto \frac{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\color{blue}{t}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    9. Applied egg-rr87.5%

      \[\leadsto \frac{\color{blue}{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\sqrt[3]{\sin k}}\right)}^{3}} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    10. Step-by-step derivation
      1. add-cube-cbrt87.4%

        \[\leadsto \color{blue}{\left(\sqrt[3]{\frac{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}}} \cdot \sqrt[3]{\frac{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}}}\right) \cdot \sqrt[3]{\frac{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}}}} \]
      2. pow387.4%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}}}\right)}^{3}} \]
    11. Applied egg-rr92.1%

      \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\sin k} \cdot t} \cdot \sqrt[3]{\frac{\frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}}}\right)}^{3}} \]
    12. Step-by-step derivation
      1. clear-num92.2%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\sin k} \cdot t} \cdot \sqrt[3]{\color{blue}{\frac{1}{\frac{2 + {\left(\frac{k}{t}\right)}^{2}}{\frac{2}{\tan k}}}}}\right)}^{3} \]
      2. cbrt-div92.3%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\sin k} \cdot t} \cdot \color{blue}{\frac{\sqrt[3]{1}}{\sqrt[3]{\frac{2 + {\left(\frac{k}{t}\right)}^{2}}{\frac{2}{\tan k}}}}}\right)}^{3} \]
      3. metadata-eval92.3%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\sin k} \cdot t} \cdot \frac{\color{blue}{1}}{\sqrt[3]{\frac{2 + {\left(\frac{k}{t}\right)}^{2}}{\frac{2}{\tan k}}}}\right)}^{3} \]
    13. Applied egg-rr92.3%

      \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\sin k} \cdot t} \cdot \color{blue}{\frac{1}{\sqrt[3]{\frac{2 + {\left(\frac{k}{t}\right)}^{2}}{\frac{2}{\tan k}}}}}\right)}^{3} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification79.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 2.3 \cdot 10^{-35}:\\ \;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t}{\cos k}}\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{\sin k}} \cdot \frac{1}{\sqrt[3]{\frac{2 + {\left(\frac{k}{t}\right)}^{2}}{\frac{2}{\tan k}}}}\right)}^{3}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 92.3% accurate, 0.5× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 4.4 \cdot 10^{-35}:\\ \;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t\_m}{\cos k}}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t\_m \cdot \sqrt[3]{\sin k}} \cdot \sqrt[3]{\frac{2}{\tan k}}\right)}^{3}}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 4.4e-35)
    (/ 2.0 (* (pow (* k (/ (sin k) l)) 2.0) (/ t_m (cos k))))
    (/
     (pow
      (* (/ (pow (cbrt l) 2.0) (* t_m (cbrt (sin k)))) (cbrt (/ 2.0 (tan k))))
      3.0)
     (+ 2.0 (pow (/ k t_m) 2.0))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 4.4e-35) {
		tmp = 2.0 / (pow((k * (sin(k) / l)), 2.0) * (t_m / cos(k)));
	} else {
		tmp = pow(((pow(cbrt(l), 2.0) / (t_m * cbrt(sin(k)))) * cbrt((2.0 / tan(k)))), 3.0) / (2.0 + pow((k / t_m), 2.0));
	}
	return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 4.4e-35) {
		tmp = 2.0 / (Math.pow((k * (Math.sin(k) / l)), 2.0) * (t_m / Math.cos(k)));
	} else {
		tmp = Math.pow(((Math.pow(Math.cbrt(l), 2.0) / (t_m * Math.cbrt(Math.sin(k)))) * Math.cbrt((2.0 / Math.tan(k)))), 3.0) / (2.0 + Math.pow((k / t_m), 2.0));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 4.4e-35)
		tmp = Float64(2.0 / Float64((Float64(k * Float64(sin(k) / l)) ^ 2.0) * Float64(t_m / cos(k))));
	else
		tmp = Float64((Float64(Float64((cbrt(l) ^ 2.0) / Float64(t_m * cbrt(sin(k)))) * cbrt(Float64(2.0 / tan(k)))) ^ 3.0) / Float64(2.0 + (Float64(k / t_m) ^ 2.0)));
	end
	return Float64(t_s * tmp)
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 4.4e-35], N[(2.0 / N[(N[Power[N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.4 \cdot 10^{-35}:\\
\;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t\_m}{\cos k}}\\

\mathbf{else}:\\
\;\;\;\;\frac{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t\_m \cdot \sqrt[3]{\sin k}} \cdot \sqrt[3]{\frac{2}{\tan k}}\right)}^{3}}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 4.39999999999999987e-35

    1. Initial program 40.3%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified40.3%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr20.5%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Taylor expanded in t around 0 40.2%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]
    6. Step-by-step derivation
      1. unpow-prod-down37.2%

        \[\leadsto \frac{2}{\color{blue}{{\left(\frac{k \cdot \sin k}{\ell}\right)}^{2} \cdot {\left(\sqrt{\frac{t}{\cos k}}\right)}^{2}}} \]
      2. associate-/l*37.2%

        \[\leadsto \frac{2}{{\color{blue}{\left(k \cdot \frac{\sin k}{\ell}\right)}}^{2} \cdot {\left(\sqrt{\frac{t}{\cos k}}\right)}^{2}} \]
      3. pow237.2%

        \[\leadsto \frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \color{blue}{\left(\sqrt{\frac{t}{\cos k}} \cdot \sqrt{\frac{t}{\cos k}}\right)}} \]
      4. add-sqr-sqrt74.8%

        \[\leadsto \frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \color{blue}{\frac{t}{\cos k}}} \]
    7. Applied egg-rr74.8%

      \[\leadsto \frac{2}{\color{blue}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t}{\cos k}}} \]

    if 4.39999999999999987e-35 < t

    1. Initial program 63.7%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified53.9%

      \[\leadsto \color{blue}{\frac{\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \left(\ell \cdot \ell\right)}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*l/53.9%

        \[\leadsto \frac{\color{blue}{\frac{2 \cdot \left(\ell \cdot \ell\right)}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)}}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      2. pow253.9%

        \[\leadsto \frac{\frac{2 \cdot \color{blue}{{\ell}^{2}}}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    5. Applied egg-rr53.9%

      \[\leadsto \frac{\color{blue}{\frac{2 \cdot {\ell}^{2}}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)}}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    6. Step-by-step derivation
      1. associate-/r*53.9%

        \[\leadsto \frac{\color{blue}{\frac{\frac{2 \cdot {\ell}^{2}}{{t}^{3}}}{\sin k \cdot \tan k}}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      2. associate-*r/53.9%

        \[\leadsto \frac{\frac{\color{blue}{2 \cdot \frac{{\ell}^{2}}{{t}^{3}}}}{\sin k \cdot \tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      3. *-commutative53.9%

        \[\leadsto \frac{\frac{\color{blue}{\frac{{\ell}^{2}}{{t}^{3}} \cdot 2}}{\sin k \cdot \tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      4. times-frac63.6%

        \[\leadsto \frac{\color{blue}{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k} \cdot \frac{2}{\tan k}}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    7. Simplified63.6%

      \[\leadsto \frac{\color{blue}{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k} \cdot \frac{2}{\tan k}}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    8. Step-by-step derivation
      1. add-cube-cbrt63.5%

        \[\leadsto \frac{\color{blue}{\left(\left(\sqrt[3]{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k}} \cdot \sqrt[3]{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k}}\right) \cdot \sqrt[3]{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k}}\right)} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      2. pow363.5%

        \[\leadsto \frac{\color{blue}{{\left(\sqrt[3]{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k}}\right)}^{3}} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      3. cbrt-div63.3%

        \[\leadsto \frac{{\color{blue}{\left(\frac{\sqrt[3]{\frac{{\ell}^{2}}{{t}^{3}}}}{\sqrt[3]{\sin k}}\right)}}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      4. cbrt-div64.6%

        \[\leadsto \frac{{\left(\frac{\color{blue}{\frac{\sqrt[3]{{\ell}^{2}}}{\sqrt[3]{{t}^{3}}}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      5. unpow264.6%

        \[\leadsto \frac{{\left(\frac{\frac{\sqrt[3]{\color{blue}{\ell \cdot \ell}}}{\sqrt[3]{{t}^{3}}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      6. cbrt-prod70.2%

        \[\leadsto \frac{{\left(\frac{\frac{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}{\sqrt[3]{{t}^{3}}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      7. unpow270.2%

        \[\leadsto \frac{{\left(\frac{\frac{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{{t}^{3}}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      8. unpow370.2%

        \[\leadsto \frac{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\color{blue}{\left(t \cdot t\right) \cdot t}}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      9. add-cbrt-cube87.5%

        \[\leadsto \frac{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\color{blue}{t}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    9. Applied egg-rr87.5%

      \[\leadsto \frac{\color{blue}{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\sqrt[3]{\sin k}}\right)}^{3}} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    10. Step-by-step derivation
      1. add-cube-cbrt87.3%

        \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}} \cdot \sqrt[3]{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}\right) \cdot \sqrt[3]{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      2. pow387.3%

        \[\leadsto \frac{\color{blue}{{\left(\sqrt[3]{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}\right)}^{3}}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      3. cbrt-prod87.3%

        \[\leadsto \frac{{\color{blue}{\left(\sqrt[3]{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\sqrt[3]{\sin k}}\right)}^{3}} \cdot \sqrt[3]{\frac{2}{\tan k}}\right)}}^{3}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      4. unpow387.2%

        \[\leadsto \frac{{\left(\sqrt[3]{\color{blue}{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\sqrt[3]{\sin k}} \cdot \frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\sqrt[3]{\sin k}}\right) \cdot \frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\sqrt[3]{\sin k}}}} \cdot \sqrt[3]{\frac{2}{\tan k}}\right)}^{3}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      5. add-cbrt-cube92.1%

        \[\leadsto \frac{{\left(\color{blue}{\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\sqrt[3]{\sin k}}} \cdot \sqrt[3]{\frac{2}{\tan k}}\right)}^{3}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      6. associate-/l/92.1%

        \[\leadsto \frac{{\left(\color{blue}{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\sin k} \cdot t}} \cdot \sqrt[3]{\frac{2}{\tan k}}\right)}^{3}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    11. Applied egg-rr92.1%

      \[\leadsto \frac{\color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\sin k} \cdot t} \cdot \sqrt[3]{\frac{2}{\tan k}}\right)}^{3}}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification79.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 4.4 \cdot 10^{-35}:\\ \;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t}{\cos k}}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{\sin k}} \cdot \sqrt[3]{\frac{2}{\tan k}}\right)}^{3}}{2 + {\left(\frac{k}{t}\right)}^{2}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 79.3% accurate, 0.6× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 7.8 \cdot 10^{-121}:\\ \;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t\_m \cdot \sqrt[3]{\sin k}} \cdot \sqrt[3]{\frac{1}{k}}\right)}^{3}\\ \mathbf{elif}\;k \leq 1.55:\\ \;\;\;\;\frac{2}{{\left(\sqrt{\sin k \cdot \tan k} \cdot \left(\frac{{t\_m}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\right)\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t\_m}{\cos k}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 7.8e-121)
    (pow
     (* (/ (pow (cbrt l) 2.0) (* t_m (cbrt (sin k)))) (cbrt (/ 1.0 k)))
     3.0)
    (if (<= k 1.55)
      (/
       2.0
       (pow
        (*
         (sqrt (* (sin k) (tan k)))
         (* (/ (pow t_m 1.5) l) (hypot 1.0 (hypot 1.0 (/ k t_m)))))
        2.0))
      (/ 2.0 (* (pow (* k (/ (sin k) l)) 2.0) (/ t_m (cos k))))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 7.8e-121) {
		tmp = pow(((pow(cbrt(l), 2.0) / (t_m * cbrt(sin(k)))) * cbrt((1.0 / k))), 3.0);
	} else if (k <= 1.55) {
		tmp = 2.0 / pow((sqrt((sin(k) * tan(k))) * ((pow(t_m, 1.5) / l) * hypot(1.0, hypot(1.0, (k / t_m))))), 2.0);
	} else {
		tmp = 2.0 / (pow((k * (sin(k) / l)), 2.0) * (t_m / cos(k)));
	}
	return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 7.8e-121) {
		tmp = Math.pow(((Math.pow(Math.cbrt(l), 2.0) / (t_m * Math.cbrt(Math.sin(k)))) * Math.cbrt((1.0 / k))), 3.0);
	} else if (k <= 1.55) {
		tmp = 2.0 / Math.pow((Math.sqrt((Math.sin(k) * Math.tan(k))) * ((Math.pow(t_m, 1.5) / l) * Math.hypot(1.0, Math.hypot(1.0, (k / t_m))))), 2.0);
	} else {
		tmp = 2.0 / (Math.pow((k * (Math.sin(k) / l)), 2.0) * (t_m / Math.cos(k)));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (k <= 7.8e-121)
		tmp = Float64(Float64((cbrt(l) ^ 2.0) / Float64(t_m * cbrt(sin(k)))) * cbrt(Float64(1.0 / k))) ^ 3.0;
	elseif (k <= 1.55)
		tmp = Float64(2.0 / (Float64(sqrt(Float64(sin(k) * tan(k))) * Float64(Float64((t_m ^ 1.5) / l) * hypot(1.0, hypot(1.0, Float64(k / t_m))))) ^ 2.0));
	else
		tmp = Float64(2.0 / Float64((Float64(k * Float64(sin(k) / l)) ^ 2.0) * Float64(t_m / cos(k))));
	end
	return Float64(t_s * tmp)
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 7.8e-121], N[Power[N[(N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[N[(1.0 / k), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], If[LessEqual[k, 1.55], N[(2.0 / N[Power[N[(N[Sqrt[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 7.8 \cdot 10^{-121}:\\
\;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t\_m \cdot \sqrt[3]{\sin k}} \cdot \sqrt[3]{\frac{1}{k}}\right)}^{3}\\

\mathbf{elif}\;k \leq 1.55:\\
\;\;\;\;\frac{2}{{\left(\sqrt{\sin k \cdot \tan k} \cdot \left(\frac{{t\_m}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\right)\right)}^{2}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t\_m}{\cos k}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if k < 7.80000000000000001e-121

    1. Initial program 49.9%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified40.9%

      \[\leadsto \color{blue}{\frac{\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \left(\ell \cdot \ell\right)}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*l/41.1%

        \[\leadsto \frac{\color{blue}{\frac{2 \cdot \left(\ell \cdot \ell\right)}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)}}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      2. pow241.1%

        \[\leadsto \frac{\frac{2 \cdot \color{blue}{{\ell}^{2}}}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    5. Applied egg-rr41.1%

      \[\leadsto \frac{\color{blue}{\frac{2 \cdot {\ell}^{2}}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)}}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    6. Step-by-step derivation
      1. associate-/r*41.1%

        \[\leadsto \frac{\color{blue}{\frac{\frac{2 \cdot {\ell}^{2}}{{t}^{3}}}{\sin k \cdot \tan k}}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      2. associate-*r/41.1%

        \[\leadsto \frac{\frac{\color{blue}{2 \cdot \frac{{\ell}^{2}}{{t}^{3}}}}{\sin k \cdot \tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      3. *-commutative41.1%

        \[\leadsto \frac{\frac{\color{blue}{\frac{{\ell}^{2}}{{t}^{3}} \cdot 2}}{\sin k \cdot \tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      4. times-frac49.9%

        \[\leadsto \frac{\color{blue}{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k} \cdot \frac{2}{\tan k}}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    7. Simplified49.9%

      \[\leadsto \frac{\color{blue}{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k} \cdot \frac{2}{\tan k}}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    8. Step-by-step derivation
      1. add-cube-cbrt49.8%

        \[\leadsto \frac{\color{blue}{\left(\left(\sqrt[3]{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k}} \cdot \sqrt[3]{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k}}\right) \cdot \sqrt[3]{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k}}\right)} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      2. pow349.8%

        \[\leadsto \frac{\color{blue}{{\left(\sqrt[3]{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k}}\right)}^{3}} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      3. cbrt-div49.8%

        \[\leadsto \frac{{\color{blue}{\left(\frac{\sqrt[3]{\frac{{\ell}^{2}}{{t}^{3}}}}{\sqrt[3]{\sin k}}\right)}}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      4. cbrt-div50.3%

        \[\leadsto \frac{{\left(\frac{\color{blue}{\frac{\sqrt[3]{{\ell}^{2}}}{\sqrt[3]{{t}^{3}}}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      5. unpow250.3%

        \[\leadsto \frac{{\left(\frac{\frac{\sqrt[3]{\color{blue}{\ell \cdot \ell}}}{\sqrt[3]{{t}^{3}}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      6. cbrt-prod57.6%

        \[\leadsto \frac{{\left(\frac{\frac{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}{\sqrt[3]{{t}^{3}}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      7. unpow257.6%

        \[\leadsto \frac{{\left(\frac{\frac{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{{t}^{3}}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      8. unpow357.6%

        \[\leadsto \frac{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\color{blue}{\left(t \cdot t\right) \cdot t}}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      9. add-cbrt-cube77.5%

        \[\leadsto \frac{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\color{blue}{t}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    9. Applied egg-rr77.5%

      \[\leadsto \frac{\color{blue}{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\sqrt[3]{\sin k}}\right)}^{3}} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    10. Step-by-step derivation
      1. add-cube-cbrt77.5%

        \[\leadsto \color{blue}{\left(\sqrt[3]{\frac{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}}} \cdot \sqrt[3]{\frac{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}}}\right) \cdot \sqrt[3]{\frac{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}}}} \]
      2. pow377.5%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}}}\right)}^{3}} \]
    11. Applied egg-rr84.3%

      \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\sin k} \cdot t} \cdot \sqrt[3]{\frac{\frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}}}\right)}^{3}} \]
    12. Taylor expanded in k around 0 74.8%

      \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\sin k} \cdot t} \cdot \sqrt[3]{\color{blue}{\frac{1}{k}}}\right)}^{3} \]

    if 7.80000000000000001e-121 < k < 1.55000000000000004

    1. Initial program 52.4%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified52.4%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr57.0%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Step-by-step derivation
      1. pow157.0%

        \[\leadsto \frac{2}{{\color{blue}{\left({\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{1}\right)}}^{2}} \]
      2. associate-*r*57.1%

        \[\leadsto \frac{2}{{\left({\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{1}\right)}^{2}} \]
    6. Applied egg-rr57.1%

      \[\leadsto \frac{2}{{\color{blue}{\left({\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{1}\right)}}^{2}} \]
    7. Step-by-step derivation
      1. unpow157.1%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2}} \]
      2. *-commutative57.1%

        \[\leadsto \frac{2}{{\color{blue}{\left(\sqrt{\sin k \cdot \tan k} \cdot \left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)\right)}}^{2}} \]
    8. Simplified57.1%

      \[\leadsto \frac{2}{{\color{blue}{\left(\sqrt{\sin k \cdot \tan k} \cdot \left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)\right)}}^{2}} \]

    if 1.55000000000000004 < k

    1. Initial program 39.3%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified39.3%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr30.5%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Taylor expanded in t around 0 55.7%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]
    6. Step-by-step derivation
      1. unpow-prod-down54.5%

        \[\leadsto \frac{2}{\color{blue}{{\left(\frac{k \cdot \sin k}{\ell}\right)}^{2} \cdot {\left(\sqrt{\frac{t}{\cos k}}\right)}^{2}}} \]
      2. associate-/l*54.4%

        \[\leadsto \frac{2}{{\color{blue}{\left(k \cdot \frac{\sin k}{\ell}\right)}}^{2} \cdot {\left(\sqrt{\frac{t}{\cos k}}\right)}^{2}} \]
      3. pow254.4%

        \[\leadsto \frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \color{blue}{\left(\sqrt{\frac{t}{\cos k}} \cdot \sqrt{\frac{t}{\cos k}}\right)}} \]
      4. add-sqr-sqrt82.4%

        \[\leadsto \frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \color{blue}{\frac{t}{\cos k}}} \]
    7. Applied egg-rr82.4%

      \[\leadsto \frac{2}{\color{blue}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t}{\cos k}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification75.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 7.8 \cdot 10^{-121}:\\ \;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{\sin k}} \cdot \sqrt[3]{\frac{1}{k}}\right)}^{3}\\ \mathbf{elif}\;k \leq 1.55:\\ \;\;\;\;\frac{2}{{\left(\sqrt{\sin k \cdot \tan k} \cdot \left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t}{\cos k}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 89.7% accurate, 0.6× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 4.1 \cdot 10^{-35}:\\ \;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t\_m}{\cos k}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{2}{\tan k} \cdot {\left(\frac{1}{\frac{\sqrt[3]{\sin k}}{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t\_m}}}\right)}^{3}}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 4.1e-35)
    (/ 2.0 (* (pow (* k (/ (sin k) l)) 2.0) (/ t_m (cos k))))
    (/
     (*
      (/ 2.0 (tan k))
      (pow (/ 1.0 (/ (cbrt (sin k)) (/ (pow (cbrt l) 2.0) t_m))) 3.0))
     (+ 2.0 (pow (/ k t_m) 2.0))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 4.1e-35) {
		tmp = 2.0 / (pow((k * (sin(k) / l)), 2.0) * (t_m / cos(k)));
	} else {
		tmp = ((2.0 / tan(k)) * pow((1.0 / (cbrt(sin(k)) / (pow(cbrt(l), 2.0) / t_m))), 3.0)) / (2.0 + pow((k / t_m), 2.0));
	}
	return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 4.1e-35) {
		tmp = 2.0 / (Math.pow((k * (Math.sin(k) / l)), 2.0) * (t_m / Math.cos(k)));
	} else {
		tmp = ((2.0 / Math.tan(k)) * Math.pow((1.0 / (Math.cbrt(Math.sin(k)) / (Math.pow(Math.cbrt(l), 2.0) / t_m))), 3.0)) / (2.0 + Math.pow((k / t_m), 2.0));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 4.1e-35)
		tmp = Float64(2.0 / Float64((Float64(k * Float64(sin(k) / l)) ^ 2.0) * Float64(t_m / cos(k))));
	else
		tmp = Float64(Float64(Float64(2.0 / tan(k)) * (Float64(1.0 / Float64(cbrt(sin(k)) / Float64((cbrt(l) ^ 2.0) / t_m))) ^ 3.0)) / Float64(2.0 + (Float64(k / t_m) ^ 2.0)));
	end
	return Float64(t_s * tmp)
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 4.1e-35], N[(2.0 / N[(N[Power[N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[Power[N[(1.0 / N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] / N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.1 \cdot 10^{-35}:\\
\;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t\_m}{\cos k}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{2}{\tan k} \cdot {\left(\frac{1}{\frac{\sqrt[3]{\sin k}}{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t\_m}}}\right)}^{3}}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 4.10000000000000026e-35

    1. Initial program 40.3%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified40.3%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr20.5%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Taylor expanded in t around 0 40.2%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]
    6. Step-by-step derivation
      1. unpow-prod-down37.2%

        \[\leadsto \frac{2}{\color{blue}{{\left(\frac{k \cdot \sin k}{\ell}\right)}^{2} \cdot {\left(\sqrt{\frac{t}{\cos k}}\right)}^{2}}} \]
      2. associate-/l*37.2%

        \[\leadsto \frac{2}{{\color{blue}{\left(k \cdot \frac{\sin k}{\ell}\right)}}^{2} \cdot {\left(\sqrt{\frac{t}{\cos k}}\right)}^{2}} \]
      3. pow237.2%

        \[\leadsto \frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \color{blue}{\left(\sqrt{\frac{t}{\cos k}} \cdot \sqrt{\frac{t}{\cos k}}\right)}} \]
      4. add-sqr-sqrt74.8%

        \[\leadsto \frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \color{blue}{\frac{t}{\cos k}}} \]
    7. Applied egg-rr74.8%

      \[\leadsto \frac{2}{\color{blue}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t}{\cos k}}} \]

    if 4.10000000000000026e-35 < t

    1. Initial program 63.7%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified53.9%

      \[\leadsto \color{blue}{\frac{\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \left(\ell \cdot \ell\right)}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*l/53.9%

        \[\leadsto \frac{\color{blue}{\frac{2 \cdot \left(\ell \cdot \ell\right)}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)}}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      2. pow253.9%

        \[\leadsto \frac{\frac{2 \cdot \color{blue}{{\ell}^{2}}}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    5. Applied egg-rr53.9%

      \[\leadsto \frac{\color{blue}{\frac{2 \cdot {\ell}^{2}}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)}}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    6. Step-by-step derivation
      1. associate-/r*53.9%

        \[\leadsto \frac{\color{blue}{\frac{\frac{2 \cdot {\ell}^{2}}{{t}^{3}}}{\sin k \cdot \tan k}}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      2. associate-*r/53.9%

        \[\leadsto \frac{\frac{\color{blue}{2 \cdot \frac{{\ell}^{2}}{{t}^{3}}}}{\sin k \cdot \tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      3. *-commutative53.9%

        \[\leadsto \frac{\frac{\color{blue}{\frac{{\ell}^{2}}{{t}^{3}} \cdot 2}}{\sin k \cdot \tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      4. times-frac63.6%

        \[\leadsto \frac{\color{blue}{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k} \cdot \frac{2}{\tan k}}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    7. Simplified63.6%

      \[\leadsto \frac{\color{blue}{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k} \cdot \frac{2}{\tan k}}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    8. Step-by-step derivation
      1. add-cube-cbrt63.5%

        \[\leadsto \frac{\color{blue}{\left(\left(\sqrt[3]{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k}} \cdot \sqrt[3]{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k}}\right) \cdot \sqrt[3]{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k}}\right)} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      2. pow363.5%

        \[\leadsto \frac{\color{blue}{{\left(\sqrt[3]{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k}}\right)}^{3}} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      3. cbrt-div63.3%

        \[\leadsto \frac{{\color{blue}{\left(\frac{\sqrt[3]{\frac{{\ell}^{2}}{{t}^{3}}}}{\sqrt[3]{\sin k}}\right)}}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      4. cbrt-div64.6%

        \[\leadsto \frac{{\left(\frac{\color{blue}{\frac{\sqrt[3]{{\ell}^{2}}}{\sqrt[3]{{t}^{3}}}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      5. unpow264.6%

        \[\leadsto \frac{{\left(\frac{\frac{\sqrt[3]{\color{blue}{\ell \cdot \ell}}}{\sqrt[3]{{t}^{3}}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      6. cbrt-prod70.2%

        \[\leadsto \frac{{\left(\frac{\frac{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}{\sqrt[3]{{t}^{3}}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      7. unpow270.2%

        \[\leadsto \frac{{\left(\frac{\frac{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{{t}^{3}}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      8. unpow370.2%

        \[\leadsto \frac{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\color{blue}{\left(t \cdot t\right) \cdot t}}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      9. add-cbrt-cube87.5%

        \[\leadsto \frac{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\color{blue}{t}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    9. Applied egg-rr87.5%

      \[\leadsto \frac{\color{blue}{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\sqrt[3]{\sin k}}\right)}^{3}} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    10. Step-by-step derivation
      1. clear-num87.5%

        \[\leadsto \frac{{\color{blue}{\left(\frac{1}{\frac{\sqrt[3]{\sin k}}{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}}\right)}}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      2. inv-pow87.5%

        \[\leadsto \frac{{\color{blue}{\left({\left(\frac{\sqrt[3]{\sin k}}{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}\right)}^{-1}\right)}}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    11. Applied egg-rr87.5%

      \[\leadsto \frac{{\color{blue}{\left({\left(\frac{\sqrt[3]{\sin k}}{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}\right)}^{-1}\right)}}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    12. Step-by-step derivation
      1. unpow-187.5%

        \[\leadsto \frac{{\color{blue}{\left(\frac{1}{\frac{\sqrt[3]{\sin k}}{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}}\right)}}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    13. Simplified87.5%

      \[\leadsto \frac{{\color{blue}{\left(\frac{1}{\frac{\sqrt[3]{\sin k}}{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}}\right)}}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification78.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 4.1 \cdot 10^{-35}:\\ \;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t}{\cos k}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{2}{\tan k} \cdot {\left(\frac{1}{\frac{\sqrt[3]{\sin k}}{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}}\right)}^{3}}{2 + {\left(\frac{k}{t}\right)}^{2}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 89.7% accurate, 0.6× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 3.25 \cdot 10^{-35}:\\ \;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t\_m}{\cos k}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{2}{\tan k} \cdot {\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t\_m}}{\sqrt[3]{\sin k}}\right)}^{3}}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 3.25e-35)
    (/ 2.0 (* (pow (* k (/ (sin k) l)) 2.0) (/ t_m (cos k))))
    (/
     (*
      (/ 2.0 (tan k))
      (pow (/ (/ (pow (cbrt l) 2.0) t_m) (cbrt (sin k))) 3.0))
     (+ 2.0 (pow (/ k t_m) 2.0))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 3.25e-35) {
		tmp = 2.0 / (pow((k * (sin(k) / l)), 2.0) * (t_m / cos(k)));
	} else {
		tmp = ((2.0 / tan(k)) * pow(((pow(cbrt(l), 2.0) / t_m) / cbrt(sin(k))), 3.0)) / (2.0 + pow((k / t_m), 2.0));
	}
	return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 3.25e-35) {
		tmp = 2.0 / (Math.pow((k * (Math.sin(k) / l)), 2.0) * (t_m / Math.cos(k)));
	} else {
		tmp = ((2.0 / Math.tan(k)) * Math.pow(((Math.pow(Math.cbrt(l), 2.0) / t_m) / Math.cbrt(Math.sin(k))), 3.0)) / (2.0 + Math.pow((k / t_m), 2.0));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 3.25e-35)
		tmp = Float64(2.0 / Float64((Float64(k * Float64(sin(k) / l)) ^ 2.0) * Float64(t_m / cos(k))));
	else
		tmp = Float64(Float64(Float64(2.0 / tan(k)) * (Float64(Float64((cbrt(l) ^ 2.0) / t_m) / cbrt(sin(k))) ^ 3.0)) / Float64(2.0 + (Float64(k / t_m) ^ 2.0)));
	end
	return Float64(t_s * tmp)
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 3.25e-35], N[(2.0 / N[(N[Power[N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / t$95$m), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.25 \cdot 10^{-35}:\\
\;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t\_m}{\cos k}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{2}{\tan k} \cdot {\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t\_m}}{\sqrt[3]{\sin k}}\right)}^{3}}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 3.2499999999999999e-35

    1. Initial program 40.3%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified40.3%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr20.5%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Taylor expanded in t around 0 40.2%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]
    6. Step-by-step derivation
      1. unpow-prod-down37.2%

        \[\leadsto \frac{2}{\color{blue}{{\left(\frac{k \cdot \sin k}{\ell}\right)}^{2} \cdot {\left(\sqrt{\frac{t}{\cos k}}\right)}^{2}}} \]
      2. associate-/l*37.2%

        \[\leadsto \frac{2}{{\color{blue}{\left(k \cdot \frac{\sin k}{\ell}\right)}}^{2} \cdot {\left(\sqrt{\frac{t}{\cos k}}\right)}^{2}} \]
      3. pow237.2%

        \[\leadsto \frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \color{blue}{\left(\sqrt{\frac{t}{\cos k}} \cdot \sqrt{\frac{t}{\cos k}}\right)}} \]
      4. add-sqr-sqrt74.8%

        \[\leadsto \frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \color{blue}{\frac{t}{\cos k}}} \]
    7. Applied egg-rr74.8%

      \[\leadsto \frac{2}{\color{blue}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t}{\cos k}}} \]

    if 3.2499999999999999e-35 < t

    1. Initial program 63.7%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified53.9%

      \[\leadsto \color{blue}{\frac{\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \left(\ell \cdot \ell\right)}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*l/53.9%

        \[\leadsto \frac{\color{blue}{\frac{2 \cdot \left(\ell \cdot \ell\right)}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)}}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      2. pow253.9%

        \[\leadsto \frac{\frac{2 \cdot \color{blue}{{\ell}^{2}}}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    5. Applied egg-rr53.9%

      \[\leadsto \frac{\color{blue}{\frac{2 \cdot {\ell}^{2}}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)}}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    6. Step-by-step derivation
      1. associate-/r*53.9%

        \[\leadsto \frac{\color{blue}{\frac{\frac{2 \cdot {\ell}^{2}}{{t}^{3}}}{\sin k \cdot \tan k}}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      2. associate-*r/53.9%

        \[\leadsto \frac{\frac{\color{blue}{2 \cdot \frac{{\ell}^{2}}{{t}^{3}}}}{\sin k \cdot \tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      3. *-commutative53.9%

        \[\leadsto \frac{\frac{\color{blue}{\frac{{\ell}^{2}}{{t}^{3}} \cdot 2}}{\sin k \cdot \tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      4. times-frac63.6%

        \[\leadsto \frac{\color{blue}{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k} \cdot \frac{2}{\tan k}}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    7. Simplified63.6%

      \[\leadsto \frac{\color{blue}{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k} \cdot \frac{2}{\tan k}}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    8. Step-by-step derivation
      1. add-cube-cbrt63.5%

        \[\leadsto \frac{\color{blue}{\left(\left(\sqrt[3]{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k}} \cdot \sqrt[3]{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k}}\right) \cdot \sqrt[3]{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k}}\right)} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      2. pow363.5%

        \[\leadsto \frac{\color{blue}{{\left(\sqrt[3]{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k}}\right)}^{3}} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      3. cbrt-div63.3%

        \[\leadsto \frac{{\color{blue}{\left(\frac{\sqrt[3]{\frac{{\ell}^{2}}{{t}^{3}}}}{\sqrt[3]{\sin k}}\right)}}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      4. cbrt-div64.6%

        \[\leadsto \frac{{\left(\frac{\color{blue}{\frac{\sqrt[3]{{\ell}^{2}}}{\sqrt[3]{{t}^{3}}}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      5. unpow264.6%

        \[\leadsto \frac{{\left(\frac{\frac{\sqrt[3]{\color{blue}{\ell \cdot \ell}}}{\sqrt[3]{{t}^{3}}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      6. cbrt-prod70.2%

        \[\leadsto \frac{{\left(\frac{\frac{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}{\sqrt[3]{{t}^{3}}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      7. unpow270.2%

        \[\leadsto \frac{{\left(\frac{\frac{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{{t}^{3}}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      8. unpow370.2%

        \[\leadsto \frac{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\color{blue}{\left(t \cdot t\right) \cdot t}}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      9. add-cbrt-cube87.5%

        \[\leadsto \frac{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\color{blue}{t}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    9. Applied egg-rr87.5%

      \[\leadsto \frac{\color{blue}{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\sqrt[3]{\sin k}}\right)}^{3}} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification78.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 3.25 \cdot 10^{-35}:\\ \;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t}{\cos k}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{2}{\tan k} \cdot {\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\sqrt[3]{\sin k}}\right)}^{3}}{2 + {\left(\frac{k}{t}\right)}^{2}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 79.2% accurate, 0.7× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 8 \cdot 10^{-121}:\\ \;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t\_m \cdot \sqrt[3]{\sin k}} \cdot \sqrt[3]{\frac{1}{k}}\right)}^{3}\\ \mathbf{elif}\;k \leq 1.4:\\ \;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\right)\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t\_m}{\cos k}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 8e-121)
    (pow
     (* (/ (pow (cbrt l) 2.0) (* t_m (cbrt (sin k)))) (cbrt (/ 1.0 k)))
     3.0)
    (if (<= k 1.4)
      (/
       2.0
       (pow
        (* (/ (pow t_m 1.5) l) (* k (hypot 1.0 (hypot 1.0 (/ k t_m)))))
        2.0))
      (/ 2.0 (* (pow (* k (/ (sin k) l)) 2.0) (/ t_m (cos k))))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 8e-121) {
		tmp = pow(((pow(cbrt(l), 2.0) / (t_m * cbrt(sin(k)))) * cbrt((1.0 / k))), 3.0);
	} else if (k <= 1.4) {
		tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * hypot(1.0, hypot(1.0, (k / t_m))))), 2.0);
	} else {
		tmp = 2.0 / (pow((k * (sin(k) / l)), 2.0) * (t_m / cos(k)));
	}
	return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 8e-121) {
		tmp = Math.pow(((Math.pow(Math.cbrt(l), 2.0) / (t_m * Math.cbrt(Math.sin(k)))) * Math.cbrt((1.0 / k))), 3.0);
	} else if (k <= 1.4) {
		tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.hypot(1.0, Math.hypot(1.0, (k / t_m))))), 2.0);
	} else {
		tmp = 2.0 / (Math.pow((k * (Math.sin(k) / l)), 2.0) * (t_m / Math.cos(k)));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (k <= 8e-121)
		tmp = Float64(Float64((cbrt(l) ^ 2.0) / Float64(t_m * cbrt(sin(k)))) * cbrt(Float64(1.0 / k))) ^ 3.0;
	elseif (k <= 1.4)
		tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * hypot(1.0, hypot(1.0, Float64(k / t_m))))) ^ 2.0));
	else
		tmp = Float64(2.0 / Float64((Float64(k * Float64(sin(k) / l)) ^ 2.0) * Float64(t_m / cos(k))));
	end
	return Float64(t_s * tmp)
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 8e-121], N[Power[N[(N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[N[(1.0 / k), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], If[LessEqual[k, 1.4], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 8 \cdot 10^{-121}:\\
\;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t\_m \cdot \sqrt[3]{\sin k}} \cdot \sqrt[3]{\frac{1}{k}}\right)}^{3}\\

\mathbf{elif}\;k \leq 1.4:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\right)\right)}^{2}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t\_m}{\cos k}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if k < 7.9999999999999998e-121

    1. Initial program 49.9%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified40.9%

      \[\leadsto \color{blue}{\frac{\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \left(\ell \cdot \ell\right)}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*l/41.1%

        \[\leadsto \frac{\color{blue}{\frac{2 \cdot \left(\ell \cdot \ell\right)}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)}}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      2. pow241.1%

        \[\leadsto \frac{\frac{2 \cdot \color{blue}{{\ell}^{2}}}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    5. Applied egg-rr41.1%

      \[\leadsto \frac{\color{blue}{\frac{2 \cdot {\ell}^{2}}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)}}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    6. Step-by-step derivation
      1. associate-/r*41.1%

        \[\leadsto \frac{\color{blue}{\frac{\frac{2 \cdot {\ell}^{2}}{{t}^{3}}}{\sin k \cdot \tan k}}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      2. associate-*r/41.1%

        \[\leadsto \frac{\frac{\color{blue}{2 \cdot \frac{{\ell}^{2}}{{t}^{3}}}}{\sin k \cdot \tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      3. *-commutative41.1%

        \[\leadsto \frac{\frac{\color{blue}{\frac{{\ell}^{2}}{{t}^{3}} \cdot 2}}{\sin k \cdot \tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      4. times-frac49.9%

        \[\leadsto \frac{\color{blue}{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k} \cdot \frac{2}{\tan k}}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    7. Simplified49.9%

      \[\leadsto \frac{\color{blue}{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k} \cdot \frac{2}{\tan k}}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    8. Step-by-step derivation
      1. add-cube-cbrt49.8%

        \[\leadsto \frac{\color{blue}{\left(\left(\sqrt[3]{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k}} \cdot \sqrt[3]{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k}}\right) \cdot \sqrt[3]{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k}}\right)} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      2. pow349.8%

        \[\leadsto \frac{\color{blue}{{\left(\sqrt[3]{\frac{\frac{{\ell}^{2}}{{t}^{3}}}{\sin k}}\right)}^{3}} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      3. cbrt-div49.8%

        \[\leadsto \frac{{\color{blue}{\left(\frac{\sqrt[3]{\frac{{\ell}^{2}}{{t}^{3}}}}{\sqrt[3]{\sin k}}\right)}}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      4. cbrt-div50.3%

        \[\leadsto \frac{{\left(\frac{\color{blue}{\frac{\sqrt[3]{{\ell}^{2}}}{\sqrt[3]{{t}^{3}}}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      5. unpow250.3%

        \[\leadsto \frac{{\left(\frac{\frac{\sqrt[3]{\color{blue}{\ell \cdot \ell}}}{\sqrt[3]{{t}^{3}}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      6. cbrt-prod57.6%

        \[\leadsto \frac{{\left(\frac{\frac{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}{\sqrt[3]{{t}^{3}}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      7. unpow257.6%

        \[\leadsto \frac{{\left(\frac{\frac{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{{t}^{3}}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      8. unpow357.6%

        \[\leadsto \frac{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\color{blue}{\left(t \cdot t\right) \cdot t}}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      9. add-cbrt-cube77.5%

        \[\leadsto \frac{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\color{blue}{t}}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    9. Applied egg-rr77.5%

      \[\leadsto \frac{\color{blue}{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\sqrt[3]{\sin k}}\right)}^{3}} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    10. Step-by-step derivation
      1. add-cube-cbrt77.5%

        \[\leadsto \color{blue}{\left(\sqrt[3]{\frac{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}}} \cdot \sqrt[3]{\frac{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}}}\right) \cdot \sqrt[3]{\frac{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}}}} \]
      2. pow377.5%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}}}\right)}^{3}} \]
    11. Applied egg-rr84.3%

      \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\sin k} \cdot t} \cdot \sqrt[3]{\frac{\frac{2}{\tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}}}\right)}^{3}} \]
    12. Taylor expanded in k around 0 74.8%

      \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\sin k} \cdot t} \cdot \sqrt[3]{\color{blue}{\frac{1}{k}}}\right)}^{3} \]

    if 7.9999999999999998e-121 < k < 1.3999999999999999

    1. Initial program 52.4%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified52.4%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr57.0%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Taylor expanded in k around 0 54.7%

      \[\leadsto \frac{2}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \color{blue}{k}\right)\right)}^{2}} \]

    if 1.3999999999999999 < k

    1. Initial program 39.3%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified39.3%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr30.5%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Taylor expanded in t around 0 55.7%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]
    6. Step-by-step derivation
      1. unpow-prod-down54.5%

        \[\leadsto \frac{2}{\color{blue}{{\left(\frac{k \cdot \sin k}{\ell}\right)}^{2} \cdot {\left(\sqrt{\frac{t}{\cos k}}\right)}^{2}}} \]
      2. associate-/l*54.4%

        \[\leadsto \frac{2}{{\color{blue}{\left(k \cdot \frac{\sin k}{\ell}\right)}}^{2} \cdot {\left(\sqrt{\frac{t}{\cos k}}\right)}^{2}} \]
      3. pow254.4%

        \[\leadsto \frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \color{blue}{\left(\sqrt{\frac{t}{\cos k}} \cdot \sqrt{\frac{t}{\cos k}}\right)}} \]
      4. add-sqr-sqrt82.4%

        \[\leadsto \frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \color{blue}{\frac{t}{\cos k}}} \]
    7. Applied egg-rr82.4%

      \[\leadsto \frac{2}{\color{blue}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t}{\cos k}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification75.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 8 \cdot 10^{-121}:\\ \;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{\sin k}} \cdot \sqrt[3]{\frac{1}{k}}\right)}^{3}\\ \mathbf{elif}\;k \leq 1.4:\\ \;\;\;\;\frac{2}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(k \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t}{\cos k}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 77.7% accurate, 1.0× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \sqrt[3]{\frac{1}{\ell}}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 7.5 \cdot 10^{-121}:\\ \;\;\;\;\frac{2}{{\left(\left(t\_m \cdot \sqrt[3]{k}\right) \cdot \left(t\_2 \cdot t\_2\right)\right)}^{3} \cdot \left(2 \cdot k\right)}\\ \mathbf{elif}\;k \leq 0.95:\\ \;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\right)\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t\_m}{\cos k}}\\ \end{array} \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (let* ((t_2 (cbrt (/ 1.0 l))))
   (*
    t_s
    (if (<= k 7.5e-121)
      (/ 2.0 (* (pow (* (* t_m (cbrt k)) (* t_2 t_2)) 3.0) (* 2.0 k)))
      (if (<= k 0.95)
        (/
         2.0
         (pow
          (* (/ (pow t_m 1.5) l) (* k (hypot 1.0 (hypot 1.0 (/ k t_m)))))
          2.0))
        (/ 2.0 (* (pow (* k (/ (sin k) l)) 2.0) (/ t_m (cos k)))))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double t_2 = cbrt((1.0 / l));
	double tmp;
	if (k <= 7.5e-121) {
		tmp = 2.0 / (pow(((t_m * cbrt(k)) * (t_2 * t_2)), 3.0) * (2.0 * k));
	} else if (k <= 0.95) {
		tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * hypot(1.0, hypot(1.0, (k / t_m))))), 2.0);
	} else {
		tmp = 2.0 / (pow((k * (sin(k) / l)), 2.0) * (t_m / cos(k)));
	}
	return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double t_2 = Math.cbrt((1.0 / l));
	double tmp;
	if (k <= 7.5e-121) {
		tmp = 2.0 / (Math.pow(((t_m * Math.cbrt(k)) * (t_2 * t_2)), 3.0) * (2.0 * k));
	} else if (k <= 0.95) {
		tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.hypot(1.0, Math.hypot(1.0, (k / t_m))))), 2.0);
	} else {
		tmp = 2.0 / (Math.pow((k * (Math.sin(k) / l)), 2.0) * (t_m / Math.cos(k)));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	t_2 = cbrt(Float64(1.0 / l))
	tmp = 0.0
	if (k <= 7.5e-121)
		tmp = Float64(2.0 / Float64((Float64(Float64(t_m * cbrt(k)) * Float64(t_2 * t_2)) ^ 3.0) * Float64(2.0 * k)));
	elseif (k <= 0.95)
		tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * hypot(1.0, hypot(1.0, Float64(k / t_m))))) ^ 2.0));
	else
		tmp = Float64(2.0 / Float64((Float64(k * Float64(sin(k) / l)) ^ 2.0) * Float64(t_m / cos(k))));
	end
	return Float64(t_s * tmp)
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[Power[N[(1.0 / l), $MachinePrecision], 1/3], $MachinePrecision]}, N[(t$95$s * If[LessEqual[k, 7.5e-121], N[(2.0 / N[(N[Power[N[(N[(t$95$m * N[Power[k, 1/3], $MachinePrecision]), $MachinePrecision] * N[(t$95$2 * t$95$2), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 0.95], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := \sqrt[3]{\frac{1}{\ell}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 7.5 \cdot 10^{-121}:\\
\;\;\;\;\frac{2}{{\left(\left(t\_m \cdot \sqrt[3]{k}\right) \cdot \left(t\_2 \cdot t\_2\right)\right)}^{3} \cdot \left(2 \cdot k\right)}\\

\mathbf{elif}\;k \leq 0.95:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\right)\right)}^{2}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t\_m}{\cos k}}\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if k < 7.50000000000000027e-121

    1. Initial program 49.9%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified49.9%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in k around 0 47.0%

      \[\leadsto \frac{2}{\color{blue}{\frac{k \cdot {t}^{3}}{{\ell}^{2}}} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    5. Taylor expanded in k around 0 52.1%

      \[\leadsto \frac{2}{\frac{k \cdot {t}^{3}}{{\ell}^{2}} \cdot \color{blue}{\left(2 \cdot k\right)}} \]
    6. Step-by-step derivation
      1. add-cube-cbrt52.1%

        \[\leadsto \frac{2}{\color{blue}{\left(\left(\sqrt[3]{\frac{k \cdot {t}^{3}}{{\ell}^{2}}} \cdot \sqrt[3]{\frac{k \cdot {t}^{3}}{{\ell}^{2}}}\right) \cdot \sqrt[3]{\frac{k \cdot {t}^{3}}{{\ell}^{2}}}\right)} \cdot \left(2 \cdot k\right)} \]
      2. pow352.1%

        \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt[3]{\frac{k \cdot {t}^{3}}{{\ell}^{2}}}\right)}^{3}} \cdot \left(2 \cdot k\right)} \]
      3. div-inv52.1%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\color{blue}{\left(k \cdot {t}^{3}\right) \cdot \frac{1}{{\ell}^{2}}}}\right)}^{3} \cdot \left(2 \cdot k\right)} \]
      4. cbrt-prod52.0%

        \[\leadsto \frac{2}{{\color{blue}{\left(\sqrt[3]{k \cdot {t}^{3}} \cdot \sqrt[3]{\frac{1}{{\ell}^{2}}}\right)}}^{3} \cdot \left(2 \cdot k\right)} \]
      5. *-commutative52.0%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\color{blue}{{t}^{3} \cdot k}} \cdot \sqrt[3]{\frac{1}{{\ell}^{2}}}\right)}^{3} \cdot \left(2 \cdot k\right)} \]
      6. cbrt-prod52.1%

        \[\leadsto \frac{2}{{\left(\color{blue}{\left(\sqrt[3]{{t}^{3}} \cdot \sqrt[3]{k}\right)} \cdot \sqrt[3]{\frac{1}{{\ell}^{2}}}\right)}^{3} \cdot \left(2 \cdot k\right)} \]
      7. unpow352.1%

        \[\leadsto \frac{2}{{\left(\left(\sqrt[3]{\color{blue}{\left(t \cdot t\right) \cdot t}} \cdot \sqrt[3]{k}\right) \cdot \sqrt[3]{\frac{1}{{\ell}^{2}}}\right)}^{3} \cdot \left(2 \cdot k\right)} \]
      8. add-cbrt-cube65.4%

        \[\leadsto \frac{2}{{\left(\left(\color{blue}{t} \cdot \sqrt[3]{k}\right) \cdot \sqrt[3]{\frac{1}{{\ell}^{2}}}\right)}^{3} \cdot \left(2 \cdot k\right)} \]
      9. pow-flip65.4%

        \[\leadsto \frac{2}{{\left(\left(t \cdot \sqrt[3]{k}\right) \cdot \sqrt[3]{\color{blue}{{\ell}^{\left(-2\right)}}}\right)}^{3} \cdot \left(2 \cdot k\right)} \]
      10. metadata-eval65.4%

        \[\leadsto \frac{2}{{\left(\left(t \cdot \sqrt[3]{k}\right) \cdot \sqrt[3]{{\ell}^{\color{blue}{-2}}}\right)}^{3} \cdot \left(2 \cdot k\right)} \]
    7. Applied egg-rr65.4%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(t \cdot \sqrt[3]{k}\right) \cdot \sqrt[3]{{\ell}^{-2}}\right)}^{3}} \cdot \left(2 \cdot k\right)} \]
    8. Step-by-step derivation
      1. pow1/364.8%

        \[\leadsto \frac{2}{{\left(\left(t \cdot \sqrt[3]{k}\right) \cdot \color{blue}{{\left({\ell}^{-2}\right)}^{0.3333333333333333}}\right)}^{3} \cdot \left(2 \cdot k\right)} \]
      2. sqr-pow64.8%

        \[\leadsto \frac{2}{{\left(\left(t \cdot \sqrt[3]{k}\right) \cdot {\color{blue}{\left({\ell}^{\left(\frac{-2}{2}\right)} \cdot {\ell}^{\left(\frac{-2}{2}\right)}\right)}}^{0.3333333333333333}\right)}^{3} \cdot \left(2 \cdot k\right)} \]
      3. metadata-eval64.8%

        \[\leadsto \frac{2}{{\left(\left(t \cdot \sqrt[3]{k}\right) \cdot {\left({\ell}^{\color{blue}{-1}} \cdot {\ell}^{\left(\frac{-2}{2}\right)}\right)}^{0.3333333333333333}\right)}^{3} \cdot \left(2 \cdot k\right)} \]
      4. inv-pow64.8%

        \[\leadsto \frac{2}{{\left(\left(t \cdot \sqrt[3]{k}\right) \cdot {\left(\color{blue}{\frac{1}{\ell}} \cdot {\ell}^{\left(\frac{-2}{2}\right)}\right)}^{0.3333333333333333}\right)}^{3} \cdot \left(2 \cdot k\right)} \]
      5. metadata-eval64.8%

        \[\leadsto \frac{2}{{\left(\left(t \cdot \sqrt[3]{k}\right) \cdot {\left(\frac{1}{\ell} \cdot {\ell}^{\color{blue}{-1}}\right)}^{0.3333333333333333}\right)}^{3} \cdot \left(2 \cdot k\right)} \]
      6. inv-pow64.8%

        \[\leadsto \frac{2}{{\left(\left(t \cdot \sqrt[3]{k}\right) \cdot {\left(\frac{1}{\ell} \cdot \color{blue}{\frac{1}{\ell}}\right)}^{0.3333333333333333}\right)}^{3} \cdot \left(2 \cdot k\right)} \]
      7. unpow-prod-down38.4%

        \[\leadsto \frac{2}{{\left(\left(t \cdot \sqrt[3]{k}\right) \cdot \color{blue}{\left({\left(\frac{1}{\ell}\right)}^{0.3333333333333333} \cdot {\left(\frac{1}{\ell}\right)}^{0.3333333333333333}\right)}\right)}^{3} \cdot \left(2 \cdot k\right)} \]
    9. Applied egg-rr38.4%

      \[\leadsto \frac{2}{{\left(\left(t \cdot \sqrt[3]{k}\right) \cdot \color{blue}{\left({\left(\frac{1}{\ell}\right)}^{0.3333333333333333} \cdot {\left(\frac{1}{\ell}\right)}^{0.3333333333333333}\right)}\right)}^{3} \cdot \left(2 \cdot k\right)} \]
    10. Step-by-step derivation
      1. unpow1/338.5%

        \[\leadsto \frac{2}{{\left(\left(t \cdot \sqrt[3]{k}\right) \cdot \left(\color{blue}{\sqrt[3]{\frac{1}{\ell}}} \cdot {\left(\frac{1}{\ell}\right)}^{0.3333333333333333}\right)\right)}^{3} \cdot \left(2 \cdot k\right)} \]
      2. unpow1/373.4%

        \[\leadsto \frac{2}{{\left(\left(t \cdot \sqrt[3]{k}\right) \cdot \left(\sqrt[3]{\frac{1}{\ell}} \cdot \color{blue}{\sqrt[3]{\frac{1}{\ell}}}\right)\right)}^{3} \cdot \left(2 \cdot k\right)} \]
    11. Simplified73.4%

      \[\leadsto \frac{2}{{\left(\left(t \cdot \sqrt[3]{k}\right) \cdot \color{blue}{\left(\sqrt[3]{\frac{1}{\ell}} \cdot \sqrt[3]{\frac{1}{\ell}}\right)}\right)}^{3} \cdot \left(2 \cdot k\right)} \]

    if 7.50000000000000027e-121 < k < 0.94999999999999996

    1. Initial program 52.4%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified52.4%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr57.0%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Taylor expanded in k around 0 54.7%

      \[\leadsto \frac{2}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \color{blue}{k}\right)\right)}^{2}} \]

    if 0.94999999999999996 < k

    1. Initial program 39.3%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified39.3%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr30.5%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Taylor expanded in t around 0 55.7%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]
    6. Step-by-step derivation
      1. unpow-prod-down54.5%

        \[\leadsto \frac{2}{\color{blue}{{\left(\frac{k \cdot \sin k}{\ell}\right)}^{2} \cdot {\left(\sqrt{\frac{t}{\cos k}}\right)}^{2}}} \]
      2. associate-/l*54.4%

        \[\leadsto \frac{2}{{\color{blue}{\left(k \cdot \frac{\sin k}{\ell}\right)}}^{2} \cdot {\left(\sqrt{\frac{t}{\cos k}}\right)}^{2}} \]
      3. pow254.4%

        \[\leadsto \frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \color{blue}{\left(\sqrt{\frac{t}{\cos k}} \cdot \sqrt{\frac{t}{\cos k}}\right)}} \]
      4. add-sqr-sqrt82.4%

        \[\leadsto \frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \color{blue}{\frac{t}{\cos k}}} \]
    7. Applied egg-rr82.4%

      \[\leadsto \frac{2}{\color{blue}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t}{\cos k}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification74.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 7.5 \cdot 10^{-121}:\\ \;\;\;\;\frac{2}{{\left(\left(t \cdot \sqrt[3]{k}\right) \cdot \left(\sqrt[3]{\frac{1}{\ell}} \cdot \sqrt[3]{\frac{1}{\ell}}\right)\right)}^{3} \cdot \left(2 \cdot k\right)}\\ \mathbf{elif}\;k \leq 0.95:\\ \;\;\;\;\frac{2}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(k \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t}{\cos k}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 53.2% accurate, 1.0× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 9.2 \cdot 10^{-121}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\left(t\_m \cdot \sqrt[3]{k}\right) \cdot {\ell}^{-0.6666666666666666}\right)}^{3}}\\ \mathbf{elif}\;k \leq 1.55:\\ \;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\right)\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t\_m}{\cos k}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 9.2e-121)
    (/
     2.0
     (* (* 2.0 k) (pow (* (* t_m (cbrt k)) (pow l -0.6666666666666666)) 3.0)))
    (if (<= k 1.55)
      (/
       2.0
       (pow
        (* (/ (pow t_m 1.5) l) (* k (hypot 1.0 (hypot 1.0 (/ k t_m)))))
        2.0))
      (/ 2.0 (* (pow (* k (/ (sin k) l)) 2.0) (/ t_m (cos k))))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 9.2e-121) {
		tmp = 2.0 / ((2.0 * k) * pow(((t_m * cbrt(k)) * pow(l, -0.6666666666666666)), 3.0));
	} else if (k <= 1.55) {
		tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * hypot(1.0, hypot(1.0, (k / t_m))))), 2.0);
	} else {
		tmp = 2.0 / (pow((k * (sin(k) / l)), 2.0) * (t_m / cos(k)));
	}
	return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 9.2e-121) {
		tmp = 2.0 / ((2.0 * k) * Math.pow(((t_m * Math.cbrt(k)) * Math.pow(l, -0.6666666666666666)), 3.0));
	} else if (k <= 1.55) {
		tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.hypot(1.0, Math.hypot(1.0, (k / t_m))))), 2.0);
	} else {
		tmp = 2.0 / (Math.pow((k * (Math.sin(k) / l)), 2.0) * (t_m / Math.cos(k)));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (k <= 9.2e-121)
		tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(Float64(t_m * cbrt(k)) * (l ^ -0.6666666666666666)) ^ 3.0)));
	elseif (k <= 1.55)
		tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * hypot(1.0, hypot(1.0, Float64(k / t_m))))) ^ 2.0));
	else
		tmp = Float64(2.0 / Float64((Float64(k * Float64(sin(k) / l)) ^ 2.0) * Float64(t_m / cos(k))));
	end
	return Float64(t_s * tmp)
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 9.2e-121], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(N[(t$95$m * N[Power[k, 1/3], $MachinePrecision]), $MachinePrecision] * N[Power[l, -0.6666666666666666], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.55], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 9.2 \cdot 10^{-121}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\left(t\_m \cdot \sqrt[3]{k}\right) \cdot {\ell}^{-0.6666666666666666}\right)}^{3}}\\

\mathbf{elif}\;k \leq 1.55:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\right)\right)}^{2}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t\_m}{\cos k}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if k < 9.20000000000000049e-121

    1. Initial program 49.9%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified49.9%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in k around 0 47.0%

      \[\leadsto \frac{2}{\color{blue}{\frac{k \cdot {t}^{3}}{{\ell}^{2}}} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    5. Taylor expanded in k around 0 52.1%

      \[\leadsto \frac{2}{\frac{k \cdot {t}^{3}}{{\ell}^{2}} \cdot \color{blue}{\left(2 \cdot k\right)}} \]
    6. Step-by-step derivation
      1. add-cube-cbrt52.1%

        \[\leadsto \frac{2}{\color{blue}{\left(\left(\sqrt[3]{\frac{k \cdot {t}^{3}}{{\ell}^{2}}} \cdot \sqrt[3]{\frac{k \cdot {t}^{3}}{{\ell}^{2}}}\right) \cdot \sqrt[3]{\frac{k \cdot {t}^{3}}{{\ell}^{2}}}\right)} \cdot \left(2 \cdot k\right)} \]
      2. pow352.1%

        \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt[3]{\frac{k \cdot {t}^{3}}{{\ell}^{2}}}\right)}^{3}} \cdot \left(2 \cdot k\right)} \]
      3. div-inv52.1%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\color{blue}{\left(k \cdot {t}^{3}\right) \cdot \frac{1}{{\ell}^{2}}}}\right)}^{3} \cdot \left(2 \cdot k\right)} \]
      4. cbrt-prod52.0%

        \[\leadsto \frac{2}{{\color{blue}{\left(\sqrt[3]{k \cdot {t}^{3}} \cdot \sqrt[3]{\frac{1}{{\ell}^{2}}}\right)}}^{3} \cdot \left(2 \cdot k\right)} \]
      5. *-commutative52.0%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\color{blue}{{t}^{3} \cdot k}} \cdot \sqrt[3]{\frac{1}{{\ell}^{2}}}\right)}^{3} \cdot \left(2 \cdot k\right)} \]
      6. cbrt-prod52.1%

        \[\leadsto \frac{2}{{\left(\color{blue}{\left(\sqrt[3]{{t}^{3}} \cdot \sqrt[3]{k}\right)} \cdot \sqrt[3]{\frac{1}{{\ell}^{2}}}\right)}^{3} \cdot \left(2 \cdot k\right)} \]
      7. unpow352.1%

        \[\leadsto \frac{2}{{\left(\left(\sqrt[3]{\color{blue}{\left(t \cdot t\right) \cdot t}} \cdot \sqrt[3]{k}\right) \cdot \sqrt[3]{\frac{1}{{\ell}^{2}}}\right)}^{3} \cdot \left(2 \cdot k\right)} \]
      8. add-cbrt-cube65.4%

        \[\leadsto \frac{2}{{\left(\left(\color{blue}{t} \cdot \sqrt[3]{k}\right) \cdot \sqrt[3]{\frac{1}{{\ell}^{2}}}\right)}^{3} \cdot \left(2 \cdot k\right)} \]
      9. pow-flip65.4%

        \[\leadsto \frac{2}{{\left(\left(t \cdot \sqrt[3]{k}\right) \cdot \sqrt[3]{\color{blue}{{\ell}^{\left(-2\right)}}}\right)}^{3} \cdot \left(2 \cdot k\right)} \]
      10. metadata-eval65.4%

        \[\leadsto \frac{2}{{\left(\left(t \cdot \sqrt[3]{k}\right) \cdot \sqrt[3]{{\ell}^{\color{blue}{-2}}}\right)}^{3} \cdot \left(2 \cdot k\right)} \]
    7. Applied egg-rr65.4%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(t \cdot \sqrt[3]{k}\right) \cdot \sqrt[3]{{\ell}^{-2}}\right)}^{3}} \cdot \left(2 \cdot k\right)} \]
    8. Step-by-step derivation
      1. pow1/364.8%

        \[\leadsto \frac{2}{{\left(\left(t \cdot \sqrt[3]{k}\right) \cdot \color{blue}{{\left({\ell}^{-2}\right)}^{0.3333333333333333}}\right)}^{3} \cdot \left(2 \cdot k\right)} \]
      2. pow-pow38.4%

        \[\leadsto \frac{2}{{\left(\left(t \cdot \sqrt[3]{k}\right) \cdot \color{blue}{{\ell}^{\left(-2 \cdot 0.3333333333333333\right)}}\right)}^{3} \cdot \left(2 \cdot k\right)} \]
      3. metadata-eval38.4%

        \[\leadsto \frac{2}{{\left(\left(t \cdot \sqrt[3]{k}\right) \cdot {\ell}^{\color{blue}{-0.6666666666666666}}\right)}^{3} \cdot \left(2 \cdot k\right)} \]
    9. Applied egg-rr38.4%

      \[\leadsto \frac{2}{{\left(\left(t \cdot \sqrt[3]{k}\right) \cdot \color{blue}{{\ell}^{-0.6666666666666666}}\right)}^{3} \cdot \left(2 \cdot k\right)} \]

    if 9.20000000000000049e-121 < k < 1.55000000000000004

    1. Initial program 52.4%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified52.4%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr57.0%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Taylor expanded in k around 0 54.7%

      \[\leadsto \frac{2}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \color{blue}{k}\right)\right)}^{2}} \]

    if 1.55000000000000004 < k

    1. Initial program 39.3%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified39.3%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr30.5%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Taylor expanded in t around 0 55.7%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]
    6. Step-by-step derivation
      1. unpow-prod-down54.5%

        \[\leadsto \frac{2}{\color{blue}{{\left(\frac{k \cdot \sin k}{\ell}\right)}^{2} \cdot {\left(\sqrt{\frac{t}{\cos k}}\right)}^{2}}} \]
      2. associate-/l*54.4%

        \[\leadsto \frac{2}{{\color{blue}{\left(k \cdot \frac{\sin k}{\ell}\right)}}^{2} \cdot {\left(\sqrt{\frac{t}{\cos k}}\right)}^{2}} \]
      3. pow254.4%

        \[\leadsto \frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \color{blue}{\left(\sqrt{\frac{t}{\cos k}} \cdot \sqrt{\frac{t}{\cos k}}\right)}} \]
      4. add-sqr-sqrt82.4%

        \[\leadsto \frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \color{blue}{\frac{t}{\cos k}}} \]
    7. Applied egg-rr82.4%

      \[\leadsto \frac{2}{\color{blue}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t}{\cos k}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification52.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 9.2 \cdot 10^{-121}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\left(t \cdot \sqrt[3]{k}\right) \cdot {\ell}^{-0.6666666666666666}\right)}^{3}}\\ \mathbf{elif}\;k \leq 1.55:\\ \;\;\;\;\frac{2}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(k \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t}{\cos k}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 48.5% accurate, 1.3× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 2.2 \cdot 10^{-11}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\left(t\_m \cdot \sqrt[3]{k}\right) \cdot {\ell}^{-0.6666666666666666}\right)}^{3}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t\_m}{\cos k}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 2.2e-11)
    (/
     2.0
     (* (* 2.0 k) (pow (* (* t_m (cbrt k)) (pow l -0.6666666666666666)) 3.0)))
    (/ 2.0 (* (pow (* k (/ (sin k) l)) 2.0) (/ t_m (cos k)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 2.2e-11) {
		tmp = 2.0 / ((2.0 * k) * pow(((t_m * cbrt(k)) * pow(l, -0.6666666666666666)), 3.0));
	} else {
		tmp = 2.0 / (pow((k * (sin(k) / l)), 2.0) * (t_m / cos(k)));
	}
	return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 2.2e-11) {
		tmp = 2.0 / ((2.0 * k) * Math.pow(((t_m * Math.cbrt(k)) * Math.pow(l, -0.6666666666666666)), 3.0));
	} else {
		tmp = 2.0 / (Math.pow((k * (Math.sin(k) / l)), 2.0) * (t_m / Math.cos(k)));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (k <= 2.2e-11)
		tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(Float64(t_m * cbrt(k)) * (l ^ -0.6666666666666666)) ^ 3.0)));
	else
		tmp = Float64(2.0 / Float64((Float64(k * Float64(sin(k) / l)) ^ 2.0) * Float64(t_m / cos(k))));
	end
	return Float64(t_s * tmp)
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 2.2e-11], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(N[(t$95$m * N[Power[k, 1/3], $MachinePrecision]), $MachinePrecision] * N[Power[l, -0.6666666666666666], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 2.2 \cdot 10^{-11}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\left(t\_m \cdot \sqrt[3]{k}\right) \cdot {\ell}^{-0.6666666666666666}\right)}^{3}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t\_m}{\cos k}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 2.2000000000000002e-11

    1. Initial program 50.7%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified50.7%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in k around 0 48.1%

      \[\leadsto \frac{2}{\color{blue}{\frac{k \cdot {t}^{3}}{{\ell}^{2}}} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    5. Taylor expanded in k around 0 55.4%

      \[\leadsto \frac{2}{\frac{k \cdot {t}^{3}}{{\ell}^{2}} \cdot \color{blue}{\left(2 \cdot k\right)}} \]
    6. Step-by-step derivation
      1. add-cube-cbrt55.4%

        \[\leadsto \frac{2}{\color{blue}{\left(\left(\sqrt[3]{\frac{k \cdot {t}^{3}}{{\ell}^{2}}} \cdot \sqrt[3]{\frac{k \cdot {t}^{3}}{{\ell}^{2}}}\right) \cdot \sqrt[3]{\frac{k \cdot {t}^{3}}{{\ell}^{2}}}\right)} \cdot \left(2 \cdot k\right)} \]
      2. pow355.4%

        \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt[3]{\frac{k \cdot {t}^{3}}{{\ell}^{2}}}\right)}^{3}} \cdot \left(2 \cdot k\right)} \]
      3. div-inv55.4%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\color{blue}{\left(k \cdot {t}^{3}\right) \cdot \frac{1}{{\ell}^{2}}}}\right)}^{3} \cdot \left(2 \cdot k\right)} \]
      4. cbrt-prod55.3%

        \[\leadsto \frac{2}{{\color{blue}{\left(\sqrt[3]{k \cdot {t}^{3}} \cdot \sqrt[3]{\frac{1}{{\ell}^{2}}}\right)}}^{3} \cdot \left(2 \cdot k\right)} \]
      5. *-commutative55.3%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\color{blue}{{t}^{3} \cdot k}} \cdot \sqrt[3]{\frac{1}{{\ell}^{2}}}\right)}^{3} \cdot \left(2 \cdot k\right)} \]
      6. cbrt-prod55.4%

        \[\leadsto \frac{2}{{\left(\color{blue}{\left(\sqrt[3]{{t}^{3}} \cdot \sqrt[3]{k}\right)} \cdot \sqrt[3]{\frac{1}{{\ell}^{2}}}\right)}^{3} \cdot \left(2 \cdot k\right)} \]
      7. unpow355.4%

        \[\leadsto \frac{2}{{\left(\left(\sqrt[3]{\color{blue}{\left(t \cdot t\right) \cdot t}} \cdot \sqrt[3]{k}\right) \cdot \sqrt[3]{\frac{1}{{\ell}^{2}}}\right)}^{3} \cdot \left(2 \cdot k\right)} \]
      8. add-cbrt-cube67.3%

        \[\leadsto \frac{2}{{\left(\left(\color{blue}{t} \cdot \sqrt[3]{k}\right) \cdot \sqrt[3]{\frac{1}{{\ell}^{2}}}\right)}^{3} \cdot \left(2 \cdot k\right)} \]
      9. pow-flip67.3%

        \[\leadsto \frac{2}{{\left(\left(t \cdot \sqrt[3]{k}\right) \cdot \sqrt[3]{\color{blue}{{\ell}^{\left(-2\right)}}}\right)}^{3} \cdot \left(2 \cdot k\right)} \]
      10. metadata-eval67.3%

        \[\leadsto \frac{2}{{\left(\left(t \cdot \sqrt[3]{k}\right) \cdot \sqrt[3]{{\ell}^{\color{blue}{-2}}}\right)}^{3} \cdot \left(2 \cdot k\right)} \]
    7. Applied egg-rr67.3%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(t \cdot \sqrt[3]{k}\right) \cdot \sqrt[3]{{\ell}^{-2}}\right)}^{3}} \cdot \left(2 \cdot k\right)} \]
    8. Step-by-step derivation
      1. pow1/366.6%

        \[\leadsto \frac{2}{{\left(\left(t \cdot \sqrt[3]{k}\right) \cdot \color{blue}{{\left({\ell}^{-2}\right)}^{0.3333333333333333}}\right)}^{3} \cdot \left(2 \cdot k\right)} \]
      2. pow-pow40.8%

        \[\leadsto \frac{2}{{\left(\left(t \cdot \sqrt[3]{k}\right) \cdot \color{blue}{{\ell}^{\left(-2 \cdot 0.3333333333333333\right)}}\right)}^{3} \cdot \left(2 \cdot k\right)} \]
      3. metadata-eval40.8%

        \[\leadsto \frac{2}{{\left(\left(t \cdot \sqrt[3]{k}\right) \cdot {\ell}^{\color{blue}{-0.6666666666666666}}\right)}^{3} \cdot \left(2 \cdot k\right)} \]
    9. Applied egg-rr40.8%

      \[\leadsto \frac{2}{{\left(\left(t \cdot \sqrt[3]{k}\right) \cdot \color{blue}{{\ell}^{-0.6666666666666666}}\right)}^{3} \cdot \left(2 \cdot k\right)} \]

    if 2.2000000000000002e-11 < k

    1. Initial program 38.3%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified38.3%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr32.3%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Taylor expanded in t around 0 56.9%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]
    6. Step-by-step derivation
      1. unpow-prod-down54.5%

        \[\leadsto \frac{2}{\color{blue}{{\left(\frac{k \cdot \sin k}{\ell}\right)}^{2} \cdot {\left(\sqrt{\frac{t}{\cos k}}\right)}^{2}}} \]
      2. associate-/l*54.4%

        \[\leadsto \frac{2}{{\color{blue}{\left(k \cdot \frac{\sin k}{\ell}\right)}}^{2} \cdot {\left(\sqrt{\frac{t}{\cos k}}\right)}^{2}} \]
      3. pow254.4%

        \[\leadsto \frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \color{blue}{\left(\sqrt{\frac{t}{\cos k}} \cdot \sqrt{\frac{t}{\cos k}}\right)}} \]
      4. add-sqr-sqrt81.6%

        \[\leadsto \frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \color{blue}{\frac{t}{\cos k}}} \]
    7. Applied egg-rr81.6%

      \[\leadsto \frac{2}{\color{blue}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t}{\cos k}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification52.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 2.2 \cdot 10^{-11}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\left(t \cdot \sqrt[3]{k}\right) \cdot {\ell}^{-0.6666666666666666}\right)}^{3}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t}{\cos k}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 75.5% accurate, 1.3× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 2.2 \cdot 10^{-11}:\\ \;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t\_m}{\cos k}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 2.2e-11)
    (/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* k (sqrt 2.0))) 2.0))
    (/ 2.0 (* (pow (* k (/ (sin k) l)) 2.0) (/ t_m (cos k)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 2.2e-11) {
		tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * sqrt(2.0))), 2.0);
	} else {
		tmp = 2.0 / (pow((k * (sin(k) / l)), 2.0) * (t_m / cos(k)));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (k <= 2.2d-11) then
        tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) * (k * sqrt(2.0d0))) ** 2.0d0)
    else
        tmp = 2.0d0 / (((k * (sin(k) / l)) ** 2.0d0) * (t_m / cos(k)))
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 2.2e-11) {
		tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.sqrt(2.0))), 2.0);
	} else {
		tmp = 2.0 / (Math.pow((k * (Math.sin(k) / l)), 2.0) * (t_m / Math.cos(k)));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if k <= 2.2e-11:
		tmp = 2.0 / math.pow(((math.pow(t_m, 1.5) / l) * (k * math.sqrt(2.0))), 2.0)
	else:
		tmp = 2.0 / (math.pow((k * (math.sin(k) / l)), 2.0) * (t_m / math.cos(k)))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (k <= 2.2e-11)
		tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * sqrt(2.0))) ^ 2.0));
	else
		tmp = Float64(2.0 / Float64((Float64(k * Float64(sin(k) / l)) ^ 2.0) * Float64(t_m / cos(k))));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (k <= 2.2e-11)
		tmp = 2.0 / ((((t_m ^ 1.5) / l) * (k * sqrt(2.0))) ^ 2.0);
	else
		tmp = 2.0 / (((k * (sin(k) / l)) ^ 2.0) * (t_m / cos(k)));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 2.2e-11], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 2.2 \cdot 10^{-11}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t\_m}{\cos k}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 2.2000000000000002e-11

    1. Initial program 50.7%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified50.7%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr29.7%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Taylor expanded in k around 0 37.9%

      \[\leadsto \frac{2}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \color{blue}{\left(k \cdot \sqrt{2}\right)}\right)}^{2}} \]

    if 2.2000000000000002e-11 < k

    1. Initial program 38.3%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified38.3%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr32.3%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Taylor expanded in t around 0 56.9%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]
    6. Step-by-step derivation
      1. unpow-prod-down54.5%

        \[\leadsto \frac{2}{\color{blue}{{\left(\frac{k \cdot \sin k}{\ell}\right)}^{2} \cdot {\left(\sqrt{\frac{t}{\cos k}}\right)}^{2}}} \]
      2. associate-/l*54.4%

        \[\leadsto \frac{2}{{\color{blue}{\left(k \cdot \frac{\sin k}{\ell}\right)}}^{2} \cdot {\left(\sqrt{\frac{t}{\cos k}}\right)}^{2}} \]
      3. pow254.4%

        \[\leadsto \frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \color{blue}{\left(\sqrt{\frac{t}{\cos k}} \cdot \sqrt{\frac{t}{\cos k}}\right)}} \]
      4. add-sqr-sqrt81.6%

        \[\leadsto \frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \color{blue}{\frac{t}{\cos k}}} \]
    7. Applied egg-rr81.6%

      \[\leadsto \frac{2}{\color{blue}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t}{\cos k}}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 12: 73.0% accurate, 1.3× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 4.7 \cdot 10^{-105}:\\ \;\;\;\;\frac{2}{{\left({k}^{2} \cdot \frac{\sqrt{t\_m}}{\ell}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 4.7e-105)
    (/ 2.0 (pow (* (pow k 2.0) (/ (sqrt t_m) l)) 2.0))
    (/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* k (sqrt 2.0))) 2.0)))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 4.7e-105) {
		tmp = 2.0 / pow((pow(k, 2.0) * (sqrt(t_m) / l)), 2.0);
	} else {
		tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * sqrt(2.0))), 2.0);
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (t_m <= 4.7d-105) then
        tmp = 2.0d0 / (((k ** 2.0d0) * (sqrt(t_m) / l)) ** 2.0d0)
    else
        tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) * (k * sqrt(2.0d0))) ** 2.0d0)
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 4.7e-105) {
		tmp = 2.0 / Math.pow((Math.pow(k, 2.0) * (Math.sqrt(t_m) / l)), 2.0);
	} else {
		tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.sqrt(2.0))), 2.0);
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if t_m <= 4.7e-105:
		tmp = 2.0 / math.pow((math.pow(k, 2.0) * (math.sqrt(t_m) / l)), 2.0)
	else:
		tmp = 2.0 / math.pow(((math.pow(t_m, 1.5) / l) * (k * math.sqrt(2.0))), 2.0)
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 4.7e-105)
		tmp = Float64(2.0 / (Float64((k ^ 2.0) * Float64(sqrt(t_m) / l)) ^ 2.0));
	else
		tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * sqrt(2.0))) ^ 2.0));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (t_m <= 4.7e-105)
		tmp = 2.0 / (((k ^ 2.0) * (sqrt(t_m) / l)) ^ 2.0);
	else
		tmp = 2.0 / ((((t_m ^ 1.5) / l) * (k * sqrt(2.0))) ^ 2.0);
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 4.7e-105], N[(2.0 / N[Power[N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Sqrt[t$95$m], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.7 \cdot 10^{-105}:\\
\;\;\;\;\frac{2}{{\left({k}^{2} \cdot \frac{\sqrt{t\_m}}{\ell}\right)}^{2}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 4.69999999999999986e-105

    1. Initial program 39.2%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified39.2%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr15.8%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Taylor expanded in t around 0 36.9%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]
    6. Taylor expanded in k around 0 19.2%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{{k}^{2}}{\ell} \cdot \sqrt{t}\right)}}^{2}} \]
    7. Step-by-step derivation
      1. associate-*l/19.2%

        \[\leadsto \frac{2}{{\color{blue}{\left(\frac{{k}^{2} \cdot \sqrt{t}}{\ell}\right)}}^{2}} \]
      2. associate-*r/19.2%

        \[\leadsto \frac{2}{{\color{blue}{\left({k}^{2} \cdot \frac{\sqrt{t}}{\ell}\right)}}^{2}} \]
    8. Simplified19.2%

      \[\leadsto \frac{2}{{\color{blue}{\left({k}^{2} \cdot \frac{\sqrt{t}}{\ell}\right)}}^{2}} \]

    if 4.69999999999999986e-105 < t

    1. Initial program 61.5%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified61.5%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr57.1%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Taylor expanded in k around 0 69.5%

      \[\leadsto \frac{2}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \color{blue}{\left(k \cdot \sqrt{2}\right)}\right)}^{2}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 13: 67.0% accurate, 1.3× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 5 \cdot 10^{-103}:\\ \;\;\;\;\frac{2}{{\left({k}^{2} \cdot \frac{\sqrt{t\_m}}{\ell}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(\sin k \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 5e-103)
    (/ 2.0 (pow (* (pow k 2.0) (/ (sqrt t_m) l)) 2.0))
    (/ 2.0 (* (* 2.0 k) (* (sin k) (* (/ (pow t_m 2.0) l) (/ t_m l))))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 5e-103) {
		tmp = 2.0 / pow((pow(k, 2.0) * (sqrt(t_m) / l)), 2.0);
	} else {
		tmp = 2.0 / ((2.0 * k) * (sin(k) * ((pow(t_m, 2.0) / l) * (t_m / l))));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (t_m <= 5d-103) then
        tmp = 2.0d0 / (((k ** 2.0d0) * (sqrt(t_m) / l)) ** 2.0d0)
    else
        tmp = 2.0d0 / ((2.0d0 * k) * (sin(k) * (((t_m ** 2.0d0) / l) * (t_m / l))))
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 5e-103) {
		tmp = 2.0 / Math.pow((Math.pow(k, 2.0) * (Math.sqrt(t_m) / l)), 2.0);
	} else {
		tmp = 2.0 / ((2.0 * k) * (Math.sin(k) * ((Math.pow(t_m, 2.0) / l) * (t_m / l))));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if t_m <= 5e-103:
		tmp = 2.0 / math.pow((math.pow(k, 2.0) * (math.sqrt(t_m) / l)), 2.0)
	else:
		tmp = 2.0 / ((2.0 * k) * (math.sin(k) * ((math.pow(t_m, 2.0) / l) * (t_m / l))))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 5e-103)
		tmp = Float64(2.0 / (Float64((k ^ 2.0) * Float64(sqrt(t_m) / l)) ^ 2.0));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(sin(k) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l)))));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (t_m <= 5e-103)
		tmp = 2.0 / (((k ^ 2.0) * (sqrt(t_m) / l)) ^ 2.0);
	else
		tmp = 2.0 / ((2.0 * k) * (sin(k) * (((t_m ^ 2.0) / l) * (t_m / l))));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 5e-103], N[(2.0 / N[Power[N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Sqrt[t$95$m], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 5 \cdot 10^{-103}:\\
\;\;\;\;\frac{2}{{\left({k}^{2} \cdot \frac{\sqrt{t\_m}}{\ell}\right)}^{2}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(\sin k \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 4.99999999999999966e-103

    1. Initial program 39.6%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified39.6%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr16.3%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Taylor expanded in t around 0 37.2%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]
    6. Taylor expanded in k around 0 19.7%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{{k}^{2}}{\ell} \cdot \sqrt{t}\right)}}^{2}} \]
    7. Step-by-step derivation
      1. associate-*l/19.7%

        \[\leadsto \frac{2}{{\color{blue}{\left(\frac{{k}^{2} \cdot \sqrt{t}}{\ell}\right)}}^{2}} \]
      2. associate-*r/19.7%

        \[\leadsto \frac{2}{{\color{blue}{\left({k}^{2} \cdot \frac{\sqrt{t}}{\ell}\right)}}^{2}} \]
    8. Simplified19.7%

      \[\leadsto \frac{2}{{\color{blue}{\left({k}^{2} \cdot \frac{\sqrt{t}}{\ell}\right)}}^{2}} \]

    if 4.99999999999999966e-103 < t

    1. Initial program 61.0%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified61.0%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. unpow361.0%

        \[\leadsto \frac{2}{\left(\frac{\color{blue}{\left(t \cdot t\right) \cdot t}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      2. times-frac71.0%

        \[\leadsto \frac{2}{\left(\color{blue}{\left(\frac{t \cdot t}{\ell} \cdot \frac{t}{\ell}\right)} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      3. pow271.0%

        \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{{t}^{2}}}{\ell} \cdot \frac{t}{\ell}\right) \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    5. Applied egg-rr71.0%

      \[\leadsto \frac{2}{\left(\color{blue}{\left(\frac{{t}^{2}}{\ell} \cdot \frac{t}{\ell}\right)} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    6. Taylor expanded in k around 0 59.8%

      \[\leadsto \frac{2}{\left(\left(\frac{{t}^{2}}{\ell} \cdot \frac{t}{\ell}\right) \cdot \sin k\right) \cdot \color{blue}{\left(2 \cdot k\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification33.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 5 \cdot 10^{-103}:\\ \;\;\;\;\frac{2}{{\left({k}^{2} \cdot \frac{\sqrt{t}}{\ell}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(\sin k \cdot \left(\frac{{t}^{2}}{\ell} \cdot \frac{t}{\ell}\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 66.9% accurate, 1.3× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 6 \cdot 10^{-103}:\\ \;\;\;\;\frac{2}{{\left(\sqrt{t\_m} \cdot \frac{{k}^{2}}{\ell}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(\sin k \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 6e-103)
    (/ 2.0 (pow (* (sqrt t_m) (/ (pow k 2.0) l)) 2.0))
    (/ 2.0 (* (* 2.0 k) (* (sin k) (* (/ (pow t_m 2.0) l) (/ t_m l))))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 6e-103) {
		tmp = 2.0 / pow((sqrt(t_m) * (pow(k, 2.0) / l)), 2.0);
	} else {
		tmp = 2.0 / ((2.0 * k) * (sin(k) * ((pow(t_m, 2.0) / l) * (t_m / l))));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (t_m <= 6d-103) then
        tmp = 2.0d0 / ((sqrt(t_m) * ((k ** 2.0d0) / l)) ** 2.0d0)
    else
        tmp = 2.0d0 / ((2.0d0 * k) * (sin(k) * (((t_m ** 2.0d0) / l) * (t_m / l))))
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 6e-103) {
		tmp = 2.0 / Math.pow((Math.sqrt(t_m) * (Math.pow(k, 2.0) / l)), 2.0);
	} else {
		tmp = 2.0 / ((2.0 * k) * (Math.sin(k) * ((Math.pow(t_m, 2.0) / l) * (t_m / l))));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if t_m <= 6e-103:
		tmp = 2.0 / math.pow((math.sqrt(t_m) * (math.pow(k, 2.0) / l)), 2.0)
	else:
		tmp = 2.0 / ((2.0 * k) * (math.sin(k) * ((math.pow(t_m, 2.0) / l) * (t_m / l))))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 6e-103)
		tmp = Float64(2.0 / (Float64(sqrt(t_m) * Float64((k ^ 2.0) / l)) ^ 2.0));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(sin(k) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l)))));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (t_m <= 6e-103)
		tmp = 2.0 / ((sqrt(t_m) * ((k ^ 2.0) / l)) ^ 2.0);
	else
		tmp = 2.0 / ((2.0 * k) * (sin(k) * (((t_m ^ 2.0) / l) * (t_m / l))));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 6e-103], N[(2.0 / N[Power[N[(N[Sqrt[t$95$m], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 6 \cdot 10^{-103}:\\
\;\;\;\;\frac{2}{{\left(\sqrt{t\_m} \cdot \frac{{k}^{2}}{\ell}\right)}^{2}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(\sin k \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 6e-103

    1. Initial program 39.6%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified39.6%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr16.3%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Taylor expanded in t around 0 37.2%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]
    6. Taylor expanded in k around 0 19.7%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{{k}^{2}}{\ell} \cdot \sqrt{t}\right)}}^{2}} \]

    if 6e-103 < t

    1. Initial program 61.0%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified61.0%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. unpow361.0%

        \[\leadsto \frac{2}{\left(\frac{\color{blue}{\left(t \cdot t\right) \cdot t}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      2. times-frac71.0%

        \[\leadsto \frac{2}{\left(\color{blue}{\left(\frac{t \cdot t}{\ell} \cdot \frac{t}{\ell}\right)} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      3. pow271.0%

        \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{{t}^{2}}}{\ell} \cdot \frac{t}{\ell}\right) \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    5. Applied egg-rr71.0%

      \[\leadsto \frac{2}{\left(\color{blue}{\left(\frac{{t}^{2}}{\ell} \cdot \frac{t}{\ell}\right)} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    6. Taylor expanded in k around 0 59.8%

      \[\leadsto \frac{2}{\left(\left(\frac{{t}^{2}}{\ell} \cdot \frac{t}{\ell}\right) \cdot \sin k\right) \cdot \color{blue}{\left(2 \cdot k\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification33.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 6 \cdot 10^{-103}:\\ \;\;\;\;\frac{2}{{\left(\sqrt{t} \cdot \frac{{k}^{2}}{\ell}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(\sin k \cdot \left(\frac{{t}^{2}}{\ell} \cdot \frac{t}{\ell}\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 62.6% accurate, 1.9× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 1.75 \cdot 10^{-11}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(\sin k \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{4}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 1.75e-11)
    (/ 2.0 (* (* 2.0 k) (* (sin k) (* (/ (pow t_m 2.0) l) (/ t_m l)))))
    (* 2.0 (/ (pow l 2.0) (* t_m (pow k 4.0)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 1.75e-11) {
		tmp = 2.0 / ((2.0 * k) * (sin(k) * ((pow(t_m, 2.0) / l) * (t_m / l))));
	} else {
		tmp = 2.0 * (pow(l, 2.0) / (t_m * pow(k, 4.0)));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (k <= 1.75d-11) then
        tmp = 2.0d0 / ((2.0d0 * k) * (sin(k) * (((t_m ** 2.0d0) / l) * (t_m / l))))
    else
        tmp = 2.0d0 * ((l ** 2.0d0) / (t_m * (k ** 4.0d0)))
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 1.75e-11) {
		tmp = 2.0 / ((2.0 * k) * (Math.sin(k) * ((Math.pow(t_m, 2.0) / l) * (t_m / l))));
	} else {
		tmp = 2.0 * (Math.pow(l, 2.0) / (t_m * Math.pow(k, 4.0)));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if k <= 1.75e-11:
		tmp = 2.0 / ((2.0 * k) * (math.sin(k) * ((math.pow(t_m, 2.0) / l) * (t_m / l))))
	else:
		tmp = 2.0 * (math.pow(l, 2.0) / (t_m * math.pow(k, 4.0)))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (k <= 1.75e-11)
		tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(sin(k) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l)))));
	else
		tmp = Float64(2.0 * Float64((l ^ 2.0) / Float64(t_m * (k ^ 4.0))));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (k <= 1.75e-11)
		tmp = 2.0 / ((2.0 * k) * (sin(k) * (((t_m ^ 2.0) / l) * (t_m / l))));
	else
		tmp = 2.0 * ((l ^ 2.0) / (t_m * (k ^ 4.0)));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.75e-11], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.75 \cdot 10^{-11}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(\sin k \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{4}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 1.7500000000000001e-11

    1. Initial program 50.7%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified50.7%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. unpow350.7%

        \[\leadsto \frac{2}{\left(\frac{\color{blue}{\left(t \cdot t\right) \cdot t}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      2. times-frac62.2%

        \[\leadsto \frac{2}{\left(\color{blue}{\left(\frac{t \cdot t}{\ell} \cdot \frac{t}{\ell}\right)} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      3. pow262.2%

        \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{{t}^{2}}}{\ell} \cdot \frac{t}{\ell}\right) \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    5. Applied egg-rr62.2%

      \[\leadsto \frac{2}{\left(\color{blue}{\left(\frac{{t}^{2}}{\ell} \cdot \frac{t}{\ell}\right)} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    6. Taylor expanded in k around 0 62.3%

      \[\leadsto \frac{2}{\left(\left(\frac{{t}^{2}}{\ell} \cdot \frac{t}{\ell}\right) \cdot \sin k\right) \cdot \color{blue}{\left(2 \cdot k\right)}} \]

    if 1.7500000000000001e-11 < k

    1. Initial program 38.3%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified38.3%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr32.3%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Taylor expanded in t around 0 56.9%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]
    6. Taylor expanded in k around 0 44.2%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
    7. Step-by-step derivation
      1. associate-/l*42.9%

        \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    8. Simplified42.9%

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    9. Taylor expanded in k around 0 44.2%

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification57.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 1.75 \cdot 10^{-11}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(\sin k \cdot \left(\frac{{t}^{2}}{\ell} \cdot \frac{t}{\ell}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{{\ell}^{2}}{t \cdot {k}^{4}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 61.2% accurate, 1.9× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 3.8 \cdot 10^{-109}:\\ \;\;\;\;\frac{1}{\frac{t\_m}{2} \cdot \frac{{k}^{4}}{{\ell}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \frac{k \cdot {t\_m}^{3}}{{\ell}^{2}}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 3.8e-109)
    (/ 1.0 (* (/ t_m 2.0) (/ (pow k 4.0) (pow l 2.0))))
    (/ 2.0 (* (* 2.0 k) (/ (* k (pow t_m 3.0)) (pow l 2.0)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 3.8e-109) {
		tmp = 1.0 / ((t_m / 2.0) * (pow(k, 4.0) / pow(l, 2.0)));
	} else {
		tmp = 2.0 / ((2.0 * k) * ((k * pow(t_m, 3.0)) / pow(l, 2.0)));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (t_m <= 3.8d-109) then
        tmp = 1.0d0 / ((t_m / 2.0d0) * ((k ** 4.0d0) / (l ** 2.0d0)))
    else
        tmp = 2.0d0 / ((2.0d0 * k) * ((k * (t_m ** 3.0d0)) / (l ** 2.0d0)))
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 3.8e-109) {
		tmp = 1.0 / ((t_m / 2.0) * (Math.pow(k, 4.0) / Math.pow(l, 2.0)));
	} else {
		tmp = 2.0 / ((2.0 * k) * ((k * Math.pow(t_m, 3.0)) / Math.pow(l, 2.0)));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if t_m <= 3.8e-109:
		tmp = 1.0 / ((t_m / 2.0) * (math.pow(k, 4.0) / math.pow(l, 2.0)))
	else:
		tmp = 2.0 / ((2.0 * k) * ((k * math.pow(t_m, 3.0)) / math.pow(l, 2.0)))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 3.8e-109)
		tmp = Float64(1.0 / Float64(Float64(t_m / 2.0) * Float64((k ^ 4.0) / (l ^ 2.0))));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(Float64(k * (t_m ^ 3.0)) / (l ^ 2.0))));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (t_m <= 3.8e-109)
		tmp = 1.0 / ((t_m / 2.0) * ((k ^ 4.0) / (l ^ 2.0)));
	else
		tmp = 2.0 / ((2.0 * k) * ((k * (t_m ^ 3.0)) / (l ^ 2.0)));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 3.8e-109], N[(1.0 / N[(N[(t$95$m / 2.0), $MachinePrecision] * N[(N[Power[k, 4.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[(k * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.8 \cdot 10^{-109}:\\
\;\;\;\;\frac{1}{\frac{t\_m}{2} \cdot \frac{{k}^{4}}{{\ell}^{2}}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \frac{k \cdot {t\_m}^{3}}{{\ell}^{2}}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 3.80000000000000002e-109

    1. Initial program 39.7%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified39.7%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr15.4%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Taylor expanded in t around 0 36.6%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]
    6. Taylor expanded in k around 0 50.2%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
    7. Step-by-step derivation
      1. associate-/l*50.2%

        \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    8. Simplified50.2%

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    9. Step-by-step derivation
      1. clear-num50.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}{2}}} \]
      2. inv-pow50.2%

        \[\leadsto \color{blue}{{\left(\frac{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}{2}\right)}^{-1}} \]
      3. associate-*r/50.2%

        \[\leadsto {\left(\frac{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}}{2}\right)}^{-1} \]
    10. Applied egg-rr50.2%

      \[\leadsto \color{blue}{{\left(\frac{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}{2}\right)}^{-1}} \]
    11. Step-by-step derivation
      1. unpow-150.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}{2}}} \]
      2. associate-/l/50.2%

        \[\leadsto \frac{1}{\color{blue}{\frac{{k}^{4} \cdot t}{2 \cdot {\ell}^{2}}}} \]
      3. *-commutative50.2%

        \[\leadsto \frac{1}{\frac{\color{blue}{t \cdot {k}^{4}}}{2 \cdot {\ell}^{2}}} \]
      4. times-frac50.3%

        \[\leadsto \frac{1}{\color{blue}{\frac{t}{2} \cdot \frac{{k}^{4}}{{\ell}^{2}}}} \]
    12. Simplified50.3%

      \[\leadsto \color{blue}{\frac{1}{\frac{t}{2} \cdot \frac{{k}^{4}}{{\ell}^{2}}}} \]

    if 3.80000000000000002e-109 < t

    1. Initial program 60.2%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified60.1%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in k around 0 53.8%

      \[\leadsto \frac{2}{\color{blue}{\frac{k \cdot {t}^{3}}{{\ell}^{2}}} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    5. Taylor expanded in k around 0 55.1%

      \[\leadsto \frac{2}{\frac{k \cdot {t}^{3}}{{\ell}^{2}} \cdot \color{blue}{\left(2 \cdot k\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification52.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 3.8 \cdot 10^{-109}:\\ \;\;\;\;\frac{1}{\frac{t}{2} \cdot \frac{{k}^{4}}{{\ell}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \frac{k \cdot {t}^{3}}{{\ell}^{2}}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 60.8% accurate, 1.9× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 3.8 \cdot 10^{-109}:\\ \;\;\;\;\frac{1}{\frac{t\_m}{2} \cdot \frac{{k}^{4}}{{\ell}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(k \cdot \left({t\_m}^{3} \cdot {\ell}^{-2}\right)\right)}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 3.8e-109)
    (/ 1.0 (* (/ t_m 2.0) (/ (pow k 4.0) (pow l 2.0))))
    (/ 2.0 (* (* 2.0 k) (* k (* (pow t_m 3.0) (pow l -2.0))))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 3.8e-109) {
		tmp = 1.0 / ((t_m / 2.0) * (pow(k, 4.0) / pow(l, 2.0)));
	} else {
		tmp = 2.0 / ((2.0 * k) * (k * (pow(t_m, 3.0) * pow(l, -2.0))));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (t_m <= 3.8d-109) then
        tmp = 1.0d0 / ((t_m / 2.0d0) * ((k ** 4.0d0) / (l ** 2.0d0)))
    else
        tmp = 2.0d0 / ((2.0d0 * k) * (k * ((t_m ** 3.0d0) * (l ** (-2.0d0)))))
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 3.8e-109) {
		tmp = 1.0 / ((t_m / 2.0) * (Math.pow(k, 4.0) / Math.pow(l, 2.0)));
	} else {
		tmp = 2.0 / ((2.0 * k) * (k * (Math.pow(t_m, 3.0) * Math.pow(l, -2.0))));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if t_m <= 3.8e-109:
		tmp = 1.0 / ((t_m / 2.0) * (math.pow(k, 4.0) / math.pow(l, 2.0)))
	else:
		tmp = 2.0 / ((2.0 * k) * (k * (math.pow(t_m, 3.0) * math.pow(l, -2.0))))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 3.8e-109)
		tmp = Float64(1.0 / Float64(Float64(t_m / 2.0) * Float64((k ^ 4.0) / (l ^ 2.0))));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(k * Float64((t_m ^ 3.0) * (l ^ -2.0)))));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (t_m <= 3.8e-109)
		tmp = 1.0 / ((t_m / 2.0) * ((k ^ 4.0) / (l ^ 2.0)));
	else
		tmp = 2.0 / ((2.0 * k) * (k * ((t_m ^ 3.0) * (l ^ -2.0))));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 3.8e-109], N[(1.0 / N[(N[(t$95$m / 2.0), $MachinePrecision] * N[(N[Power[k, 4.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(k * N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[Power[l, -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.8 \cdot 10^{-109}:\\
\;\;\;\;\frac{1}{\frac{t\_m}{2} \cdot \frac{{k}^{4}}{{\ell}^{2}}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(k \cdot \left({t\_m}^{3} \cdot {\ell}^{-2}\right)\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 3.80000000000000002e-109

    1. Initial program 39.7%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified39.7%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr15.4%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    5. Taylor expanded in t around 0 36.6%

      \[\leadsto \frac{2}{{\color{blue}{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]
    6. Taylor expanded in k around 0 50.2%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
    7. Step-by-step derivation
      1. associate-/l*50.2%

        \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    8. Simplified50.2%

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    9. Step-by-step derivation
      1. clear-num50.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}{2}}} \]
      2. inv-pow50.2%

        \[\leadsto \color{blue}{{\left(\frac{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}{2}\right)}^{-1}} \]
      3. associate-*r/50.2%

        \[\leadsto {\left(\frac{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}}{2}\right)}^{-1} \]
    10. Applied egg-rr50.2%

      \[\leadsto \color{blue}{{\left(\frac{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}{2}\right)}^{-1}} \]
    11. Step-by-step derivation
      1. unpow-150.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}{2}}} \]
      2. associate-/l/50.2%

        \[\leadsto \frac{1}{\color{blue}{\frac{{k}^{4} \cdot t}{2 \cdot {\ell}^{2}}}} \]
      3. *-commutative50.2%

        \[\leadsto \frac{1}{\frac{\color{blue}{t \cdot {k}^{4}}}{2 \cdot {\ell}^{2}}} \]
      4. times-frac50.3%

        \[\leadsto \frac{1}{\color{blue}{\frac{t}{2} \cdot \frac{{k}^{4}}{{\ell}^{2}}}} \]
    12. Simplified50.3%

      \[\leadsto \color{blue}{\frac{1}{\frac{t}{2} \cdot \frac{{k}^{4}}{{\ell}^{2}}}} \]

    if 3.80000000000000002e-109 < t

    1. Initial program 60.2%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified60.1%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in k around 0 53.8%

      \[\leadsto \frac{2}{\color{blue}{\frac{k \cdot {t}^{3}}{{\ell}^{2}}} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    5. Taylor expanded in k around 0 55.1%

      \[\leadsto \frac{2}{\frac{k \cdot {t}^{3}}{{\ell}^{2}} \cdot \color{blue}{\left(2 \cdot k\right)}} \]
    6. Step-by-step derivation
      1. div-inv55.1%

        \[\leadsto \frac{2}{\color{blue}{\left(\left(k \cdot {t}^{3}\right) \cdot \frac{1}{{\ell}^{2}}\right)} \cdot \left(2 \cdot k\right)} \]
      2. pow-flip55.1%

        \[\leadsto \frac{2}{\left(\left(k \cdot {t}^{3}\right) \cdot \color{blue}{{\ell}^{\left(-2\right)}}\right) \cdot \left(2 \cdot k\right)} \]
      3. metadata-eval55.1%

        \[\leadsto \frac{2}{\left(\left(k \cdot {t}^{3}\right) \cdot {\ell}^{\color{blue}{-2}}\right) \cdot \left(2 \cdot k\right)} \]
    7. Applied egg-rr55.1%

      \[\leadsto \frac{2}{\color{blue}{\left(\left(k \cdot {t}^{3}\right) \cdot {\ell}^{-2}\right)} \cdot \left(2 \cdot k\right)} \]
    8. Step-by-step derivation
      1. associate-*l*54.2%

        \[\leadsto \frac{2}{\color{blue}{\left(k \cdot \left({t}^{3} \cdot {\ell}^{-2}\right)\right)} \cdot \left(2 \cdot k\right)} \]
    9. Simplified54.2%

      \[\leadsto \frac{2}{\color{blue}{\left(k \cdot \left({t}^{3} \cdot {\ell}^{-2}\right)\right)} \cdot \left(2 \cdot k\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification51.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 3.8 \cdot 10^{-109}:\\ \;\;\;\;\frac{1}{\frac{t}{2} \cdot \frac{{k}^{4}}{{\ell}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(k \cdot \left({t}^{3} \cdot {\ell}^{-2}\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 52.0% accurate, 2.0× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \frac{1}{\frac{t\_m}{2} \cdot \frac{{k}^{4}}{{\ell}^{2}}} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (* t_s (/ 1.0 (* (/ t_m 2.0) (/ (pow k 4.0) (pow l 2.0))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	return t_s * (1.0 / ((t_m / 2.0) * (pow(k, 4.0) / pow(l, 2.0))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = t_s * (1.0d0 / ((t_m / 2.0d0) * ((k ** 4.0d0) / (l ** 2.0d0))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	return t_s * (1.0 / ((t_m / 2.0) * (Math.pow(k, 4.0) / Math.pow(l, 2.0))));
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	return t_s * (1.0 / ((t_m / 2.0) * (math.pow(k, 4.0) / math.pow(l, 2.0))))
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	return Float64(t_s * Float64(1.0 / Float64(Float64(t_m / 2.0) * Float64((k ^ 4.0) / (l ^ 2.0)))))
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k)
	tmp = t_s * (1.0 / ((t_m / 2.0) * ((k ^ 4.0) / (l ^ 2.0))));
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(1.0 / N[(N[(t$95$m / 2.0), $MachinePrecision] * N[(N[Power[k, 4.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \frac{1}{\frac{t\_m}{2} \cdot \frac{{k}^{4}}{{\ell}^{2}}}
\end{array}
Derivation
  1. Initial program 47.1%

    \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
  2. Simplified47.1%

    \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
  3. Add Preprocessing
  4. Applied egg-rr30.4%

    \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
  5. Taylor expanded in t around 0 37.8%

    \[\leadsto \frac{2}{{\color{blue}{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]
  6. Taylor expanded in k around 0 43.8%

    \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
  7. Step-by-step derivation
    1. associate-/l*43.7%

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
  8. Simplified43.7%

    \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
  9. Step-by-step derivation
    1. clear-num43.7%

      \[\leadsto \color{blue}{\frac{1}{\frac{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}{2}}} \]
    2. inv-pow43.7%

      \[\leadsto \color{blue}{{\left(\frac{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}{2}\right)}^{-1}} \]
    3. associate-*r/43.8%

      \[\leadsto {\left(\frac{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}}{2}\right)}^{-1} \]
  10. Applied egg-rr43.8%

    \[\leadsto \color{blue}{{\left(\frac{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}{2}\right)}^{-1}} \]
  11. Step-by-step derivation
    1. unpow-143.8%

      \[\leadsto \color{blue}{\frac{1}{\frac{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}{2}}} \]
    2. associate-/l/43.8%

      \[\leadsto \frac{1}{\color{blue}{\frac{{k}^{4} \cdot t}{2 \cdot {\ell}^{2}}}} \]
    3. *-commutative43.8%

      \[\leadsto \frac{1}{\frac{\color{blue}{t \cdot {k}^{4}}}{2 \cdot {\ell}^{2}}} \]
    4. times-frac43.8%

      \[\leadsto \frac{1}{\color{blue}{\frac{t}{2} \cdot \frac{{k}^{4}}{{\ell}^{2}}}} \]
  12. Simplified43.8%

    \[\leadsto \color{blue}{\frac{1}{\frac{t}{2} \cdot \frac{{k}^{4}}{{\ell}^{2}}}} \]
  13. Add Preprocessing

Alternative 19: 51.7% accurate, 2.0× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(2 \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{4}}\right) \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (* t_s (* 2.0 (/ (pow l 2.0) (* t_m (pow k 4.0))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 * (pow(l, 2.0) / (t_m * pow(k, 4.0))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = t_s * (2.0d0 * ((l ** 2.0d0) / (t_m * (k ** 4.0d0))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 * (Math.pow(l, 2.0) / (t_m * Math.pow(k, 4.0))));
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	return t_s * (2.0 * (math.pow(l, 2.0) / (t_m * math.pow(k, 4.0))))
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	return Float64(t_s * Float64(2.0 * Float64((l ^ 2.0) / Float64(t_m * (k ^ 4.0)))))
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k)
	tmp = t_s * (2.0 * ((l ^ 2.0) / (t_m * (k ^ 4.0))));
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \left(2 \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{4}}\right)
\end{array}
Derivation
  1. Initial program 47.1%

    \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
  2. Simplified47.1%

    \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
  3. Add Preprocessing
  4. Applied egg-rr30.4%

    \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
  5. Taylor expanded in t around 0 37.8%

    \[\leadsto \frac{2}{{\color{blue}{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t}{\cos k}}\right)}}^{2}} \]
  6. Taylor expanded in k around 0 43.8%

    \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
  7. Step-by-step derivation
    1. associate-/l*43.7%

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
  8. Simplified43.7%

    \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
  9. Taylor expanded in k around 0 43.8%

    \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
  10. Final simplification43.8%

    \[\leadsto 2 \cdot \frac{{\ell}^{2}}{t \cdot {k}^{4}} \]
  11. Add Preprocessing

Reproduce

?
herbie shell --seed 2024108 
(FPCore (t l k)
  :name "Toniolo and Linder, Equation (10+)"
  :precision binary64
  (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))