Toniolo and Linder, Equation (10+)

Percentage Accurate: 54.6% → 82.8%
Time: 20.9s
Alternatives: 22
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 22 alternatives:

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

Initial Program: 54.6% 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: 82.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 3.8 \cdot 10^{-149}:\\ \;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t_m}{\cos k}}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\frac{t_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\sin k}\right)}^{3} \cdot {\left(\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 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 3.8e-149)
    (/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt (/ t_m (cos k)))) 2.0))
    (/
     2.0
     (*
      (pow (* (/ t_m (pow (cbrt l) 2.0)) (cbrt (sin k))) 3.0)
      (pow (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 <= 3.8e-149) {
		tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt((t_m / cos(k)))), 2.0);
	} else {
		tmp = 2.0 / (pow(((t_m / pow(cbrt(l), 2.0)) * cbrt(sin(k))), 3.0) * pow(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 <= 3.8e-149) {
		tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
	} else {
		tmp = 2.0 / (Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * Math.cbrt(Math.sin(k))), 3.0) * Math.pow(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 <= 3.8e-149)
		tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(Float64(t_m / cos(k)))) ^ 2.0));
	else
		tmp = Float64(2.0 / Float64((Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * cbrt(sin(k))) ^ 3.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, 3.8e-149], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[Power[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], 3.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.8 \cdot 10^{-149}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t_m}{\cos k}}\right)}^{2}}\\

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 2: 82.9% 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.9 \cdot 10^{-149}:\\ \;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t_m}{\cos k}}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\frac{t_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\sin k}\right)}^{3} \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)\right)}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 3.9e-149)
    (/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt (/ t_m (cos k)))) 2.0))
    (/
     2.0
     (*
      (pow (* (/ t_m (pow (cbrt l) 2.0)) (cbrt (sin k))) 3.0)
      (* (tan k) (+ 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.9e-149) {
		tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt((t_m / cos(k)))), 2.0);
	} else {
		tmp = 2.0 / (pow(((t_m / pow(cbrt(l), 2.0)) * cbrt(sin(k))), 3.0) * (tan(k) * (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.9e-149) {
		tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
	} else {
		tmp = 2.0 / (Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * Math.cbrt(Math.sin(k))), 3.0) * (Math.tan(k) * (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.9e-149)
		tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(Float64(t_m / cos(k)))) ^ 2.0));
	else
		tmp = Float64(2.0 / Float64((Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * cbrt(sin(k))) ^ 3.0) * Float64(tan(k) * 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.9e-149], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 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.9 \cdot 10^{-149}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t_m}{\cos k}}\right)}^{2}}\\

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 3: 81.0% 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}\;t_m \leq 4 \cdot 10^{-149}:\\ \;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t_m}{\cos k}}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)\right) \cdot {\left(\frac{t_m \cdot \sqrt[3]{\frac{\sin k}{\ell}}}{\sqrt[3]{\ell}}\right)}^{3}}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 4e-149)
    (/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt (/ t_m (cos k)))) 2.0))
    (/
     2.0
     (*
      (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))
      (pow (/ (* t_m (cbrt (/ (sin k) l))) (cbrt l)) 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 <= 4e-149) {
		tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt((t_m / cos(k)))), 2.0);
	} else {
		tmp = 2.0 / ((tan(k) * (2.0 + pow((k / t_m), 2.0))) * pow(((t_m * cbrt((sin(k) / l))) / cbrt(l)), 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 <= 4e-149) {
		tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
	} else {
		tmp = 2.0 / ((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))) * Math.pow(((t_m * Math.cbrt((Math.sin(k) / l))) / Math.cbrt(l)), 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 <= 4e-149)
		tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(Float64(t_m / cos(k)))) ^ 2.0));
	else
		tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * (Float64(Float64(t_m * cbrt(Float64(sin(k) / l))) / cbrt(l)) ^ 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, 4e-149], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(t$95$m * N[Power[N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 3.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 \cdot 10^{-149}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t_m}{\cos k}}\right)}^{2}}\\

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 4: 81.0% accurate, 0.8× 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 1.95 \cdot 10^{-104}:\\ \;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t_m}{\cos k}}\right)}^{2}}\\ \mathbf{elif}\;t_m \leq 4.1 \cdot 10^{+184}:\\ \;\;\;\;\frac{2}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)\right) \cdot \frac{{\left(t_m \cdot \sqrt[3]{\frac{\sin k}{\ell}}\right)}^{3}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\frac{t_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\sin k}\right)}^{3} \cdot \left(2 \cdot k\right)}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 1.95e-104)
    (/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt (/ t_m (cos k)))) 2.0))
    (if (<= t_m 4.1e+184)
      (/
       2.0
       (*
        (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))
        (/ (pow (* t_m (cbrt (/ (sin k) l))) 3.0) l)))
      (/
       2.0
       (*
        (pow (* (/ t_m (pow (cbrt l) 2.0)) (cbrt (sin k))) 3.0)
        (* 2.0 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 (t_m <= 1.95e-104) {
		tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt((t_m / cos(k)))), 2.0);
	} else if (t_m <= 4.1e+184) {
		tmp = 2.0 / ((tan(k) * (2.0 + pow((k / t_m), 2.0))) * (pow((t_m * cbrt((sin(k) / l))), 3.0) / l));
	} else {
		tmp = 2.0 / (pow(((t_m / pow(cbrt(l), 2.0)) * cbrt(sin(k))), 3.0) * (2.0 * 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 (t_m <= 1.95e-104) {
		tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
	} else if (t_m <= 4.1e+184) {
		tmp = 2.0 / ((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))) * (Math.pow((t_m * Math.cbrt((Math.sin(k) / l))), 3.0) / l));
	} else {
		tmp = 2.0 / (Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * Math.cbrt(Math.sin(k))), 3.0) * (2.0 * 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 (t_m <= 1.95e-104)
		tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(Float64(t_m / cos(k)))) ^ 2.0));
	elseif (t_m <= 4.1e+184)
		tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64((Float64(t_m * cbrt(Float64(sin(k) / l))) ^ 3.0) / l)));
	else
		tmp = Float64(2.0 / Float64((Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * cbrt(sin(k))) ^ 3.0) * Float64(2.0 * 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[t$95$m, 1.95e-104], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4.1e+184], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(t$95$m * N[Power[N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * k), $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 1.95 \cdot 10^{-104}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t_m}{\cos k}}\right)}^{2}}\\

\mathbf{elif}\;t_m \leq 4.1 \cdot 10^{+184}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)\right) \cdot \frac{{\left(t_m \cdot \sqrt[3]{\frac{\sin k}{\ell}}\right)}^{3}}{\ell}}\\

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 5: 71.3% accurate, 0.8× 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 128000:\\ \;\;\;\;\frac{2}{{\left(\frac{t_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\sin k}\right)}^{3} \cdot \left(2 \cdot k\right)}\\ \mathbf{elif}\;k \leq 1.55 \cdot 10^{+153}:\\ \;\;\;\;\frac{2 \cdot \left(\cos k \cdot {\ell}^{2}\right)}{\left(t_m \cdot {k}^{2}\right) \cdot {\sin k}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)\right) \cdot \left(\sin k \cdot {\left(\frac{{t_m}^{1.5}}{\ell}\right)}^{2}\right)}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 128000.0)
    (/
     2.0
     (* (pow (* (/ t_m (pow (cbrt l) 2.0)) (cbrt (sin k))) 3.0) (* 2.0 k)))
    (if (<= k 1.55e+153)
      (/
       (* 2.0 (* (cos k) (pow l 2.0)))
       (* (* t_m (pow k 2.0)) (pow (sin k) 2.0)))
      (/
       2.0
       (*
        (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))
        (* (sin k) (pow (/ (pow t_m 1.5) 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 (k <= 128000.0) {
		tmp = 2.0 / (pow(((t_m / pow(cbrt(l), 2.0)) * cbrt(sin(k))), 3.0) * (2.0 * k));
	} else if (k <= 1.55e+153) {
		tmp = (2.0 * (cos(k) * pow(l, 2.0))) / ((t_m * pow(k, 2.0)) * pow(sin(k), 2.0));
	} else {
		tmp = 2.0 / ((tan(k) * (2.0 + pow((k / t_m), 2.0))) * (sin(k) * pow((pow(t_m, 1.5) / l), 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 (k <= 128000.0) {
		tmp = 2.0 / (Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * Math.cbrt(Math.sin(k))), 3.0) * (2.0 * k));
	} else if (k <= 1.55e+153) {
		tmp = (2.0 * (Math.cos(k) * Math.pow(l, 2.0))) / ((t_m * Math.pow(k, 2.0)) * Math.pow(Math.sin(k), 2.0));
	} else {
		tmp = 2.0 / ((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))) * (Math.sin(k) * Math.pow((Math.pow(t_m, 1.5) / 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 (k <= 128000.0)
		tmp = Float64(2.0 / Float64((Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * cbrt(sin(k))) ^ 3.0) * Float64(2.0 * k)));
	elseif (k <= 1.55e+153)
		tmp = Float64(Float64(2.0 * Float64(cos(k) * (l ^ 2.0))) / Float64(Float64(t_m * (k ^ 2.0)) * (sin(k) ^ 2.0)));
	else
		tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(sin(k) * (Float64((t_m ^ 1.5) / l) ^ 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[k, 128000.0], N[(2.0 / N[(N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.55e+153], N[(N[(2.0 * N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 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}\;k \leq 128000:\\
\;\;\;\;\frac{2}{{\left(\frac{t_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\sin k}\right)}^{3} \cdot \left(2 \cdot k\right)}\\

\mathbf{elif}\;k \leq 1.55 \cdot 10^{+153}:\\
\;\;\;\;\frac{2 \cdot \left(\cos k \cdot {\ell}^{2}\right)}{\left(t_m \cdot {k}^{2}\right) \cdot {\sin k}^{2}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)\right) \cdot \left(\sin k \cdot {\left(\frac{{t_m}^{1.5}}{\ell}\right)}^{2}\right)}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 6: 70.8% accurate, 0.8× 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 26500:\\ \;\;\;\;\frac{2}{{\left(\frac{t_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\sin k}\right)}^{3} \cdot \left(2 \cdot k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t_m \cdot {\sin k}^{2}}{\cos k}}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 26500.0)
    (/
     2.0
     (* (pow (* (/ t_m (pow (cbrt l) 2.0)) (cbrt (sin k))) 3.0) (* 2.0 k)))
    (/
     2.0
     (* (/ (pow k 2.0) (pow l 2.0)) (/ (* t_m (pow (sin k) 2.0)) (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 <= 26500.0) {
		tmp = 2.0 / (pow(((t_m / pow(cbrt(l), 2.0)) * cbrt(sin(k))), 3.0) * (2.0 * k));
	} else {
		tmp = 2.0 / ((pow(k, 2.0) / pow(l, 2.0)) * ((t_m * pow(sin(k), 2.0)) / 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 <= 26500.0) {
		tmp = 2.0 / (Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * Math.cbrt(Math.sin(k))), 3.0) * (2.0 * k));
	} else {
		tmp = 2.0 / ((Math.pow(k, 2.0) / Math.pow(l, 2.0)) * ((t_m * Math.pow(Math.sin(k), 2.0)) / 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 <= 26500.0)
		tmp = Float64(2.0 / Float64((Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * cbrt(sin(k))) ^ 3.0) * Float64(2.0 * k)));
	else
		tmp = Float64(2.0 / Float64(Float64((k ^ 2.0) / (l ^ 2.0)) * Float64(Float64(t_m * (sin(k) ^ 2.0)) / 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, 26500.0], N[(2.0 / N[(N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Power[k, 2.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / 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 26500:\\
\;\;\;\;\frac{2}{{\left(\frac{t_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\sin k}\right)}^{3} \cdot \left(2 \cdot k\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t_m \cdot {\sin k}^{2}}{\cos k}}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 7: 70.8% accurate, 0.8× 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 22000:\\ \;\;\;\;\frac{2}{{\left(\frac{t_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\sin k}\right)}^{3} \cdot \left(2 \cdot k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{{k}^{2} \cdot {\ell}^{-2}}{\frac{\frac{\cos k}{t_m}}{{\sin k}^{2}}}}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 22000.0)
    (/
     2.0
     (* (pow (* (/ t_m (pow (cbrt l) 2.0)) (cbrt (sin k))) 3.0) (* 2.0 k)))
    (/
     2.0
     (/ (* (pow k 2.0) (pow l -2.0)) (/ (/ (cos k) t_m) (pow (sin k) 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 (k <= 22000.0) {
		tmp = 2.0 / (pow(((t_m / pow(cbrt(l), 2.0)) * cbrt(sin(k))), 3.0) * (2.0 * k));
	} else {
		tmp = 2.0 / ((pow(k, 2.0) * pow(l, -2.0)) / ((cos(k) / t_m) / pow(sin(k), 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 (k <= 22000.0) {
		tmp = 2.0 / (Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * Math.cbrt(Math.sin(k))), 3.0) * (2.0 * k));
	} else {
		tmp = 2.0 / ((Math.pow(k, 2.0) * Math.pow(l, -2.0)) / ((Math.cos(k) / t_m) / Math.pow(Math.sin(k), 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 (k <= 22000.0)
		tmp = Float64(2.0 / Float64((Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * cbrt(sin(k))) ^ 3.0) * Float64(2.0 * k)));
	else
		tmp = Float64(2.0 / Float64(Float64((k ^ 2.0) * (l ^ -2.0)) / Float64(Float64(cos(k) / t_m) / (sin(k) ^ 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[k, 22000.0], N[(2.0 / N[(N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[Power[l, -2.0], $MachinePrecision]), $MachinePrecision] / N[(N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 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}\;k \leq 22000:\\
\;\;\;\;\frac{2}{{\left(\frac{t_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\sin k}\right)}^{3} \cdot \left(2 \cdot k\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{{k}^{2} \cdot {\ell}^{-2}}{\frac{\frac{\cos k}{t_m}}{{\sin k}^{2}}}}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 8: 71.4% accurate, 0.8× 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 21500:\\ \;\;\;\;\frac{2}{{\left(\frac{t_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\sin k}\right)}^{3} \cdot \left(2 \cdot k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot \left(\cos k \cdot {\ell}^{2}\right)}{\left(t_m \cdot {k}^{2}\right) \cdot {\sin k}^{2}}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 21500.0)
    (/
     2.0
     (* (pow (* (/ t_m (pow (cbrt l) 2.0)) (cbrt (sin k))) 3.0) (* 2.0 k)))
    (/
     (* 2.0 (* (cos k) (pow l 2.0)))
     (* (* t_m (pow k 2.0)) (pow (sin k) 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 (k <= 21500.0) {
		tmp = 2.0 / (pow(((t_m / pow(cbrt(l), 2.0)) * cbrt(sin(k))), 3.0) * (2.0 * k));
	} else {
		tmp = (2.0 * (cos(k) * pow(l, 2.0))) / ((t_m * pow(k, 2.0)) * pow(sin(k), 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 (k <= 21500.0) {
		tmp = 2.0 / (Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * Math.cbrt(Math.sin(k))), 3.0) * (2.0 * k));
	} else {
		tmp = (2.0 * (Math.cos(k) * Math.pow(l, 2.0))) / ((t_m * Math.pow(k, 2.0)) * Math.pow(Math.sin(k), 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 (k <= 21500.0)
		tmp = Float64(2.0 / Float64((Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * cbrt(sin(k))) ^ 3.0) * Float64(2.0 * k)));
	else
		tmp = Float64(Float64(2.0 * Float64(cos(k) * (l ^ 2.0))) / Float64(Float64(t_m * (k ^ 2.0)) * (sin(k) ^ 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[k, 21500.0], N[(2.0 / N[(N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $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}\;k \leq 21500:\\
\;\;\;\;\frac{2}{{\left(\frac{t_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\sin k}\right)}^{3} \cdot \left(2 \cdot k\right)}\\

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 9: 70.7% accurate, 0.8× 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 125000:\\ \;\;\;\;\frac{2}{{\left(\frac{t_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\sin k}\right)}^{3} \cdot \left(2 \cdot k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t_m \cdot \left(0.5 - \frac{\cos \left(2 \cdot k\right)}{2}\right)}{\cos k}}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 125000.0)
    (/
     2.0
     (* (pow (* (/ t_m (pow (cbrt l) 2.0)) (cbrt (sin k))) 3.0) (* 2.0 k)))
    (/
     2.0
     (*
      (/ (pow k 2.0) (pow l 2.0))
      (/ (* t_m (- 0.5 (/ (cos (* 2.0 k)) 2.0))) (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 <= 125000.0) {
		tmp = 2.0 / (pow(((t_m / pow(cbrt(l), 2.0)) * cbrt(sin(k))), 3.0) * (2.0 * k));
	} else {
		tmp = 2.0 / ((pow(k, 2.0) / pow(l, 2.0)) * ((t_m * (0.5 - (cos((2.0 * k)) / 2.0))) / 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 <= 125000.0) {
		tmp = 2.0 / (Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * Math.cbrt(Math.sin(k))), 3.0) * (2.0 * k));
	} else {
		tmp = 2.0 / ((Math.pow(k, 2.0) / Math.pow(l, 2.0)) * ((t_m * (0.5 - (Math.cos((2.0 * k)) / 2.0))) / 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 <= 125000.0)
		tmp = Float64(2.0 / Float64((Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * cbrt(sin(k))) ^ 3.0) * Float64(2.0 * k)));
	else
		tmp = Float64(2.0 / Float64(Float64((k ^ 2.0) / (l ^ 2.0)) * Float64(Float64(t_m * Float64(0.5 - Float64(cos(Float64(2.0 * k)) / 2.0))) / 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, 125000.0], N[(2.0 / N[(N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Power[k, 2.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m * N[(0.5 - N[(N[Cos[N[(2.0 * k), $MachinePrecision]], $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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 125000:\\
\;\;\;\;\frac{2}{{\left(\frac{t_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\sin k}\right)}^{3} \cdot \left(2 \cdot k\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t_m \cdot \left(0.5 - \frac{\cos \left(2 \cdot k\right)}{2}\right)}{\cos k}}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 10: 78.9% accurate, 0.8× 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.5 \cdot 10^{-103}:\\ \;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t_m}{\cos k}}\right)}^{2}}\\ \mathbf{elif}\;t_m \leq 3.2 \cdot 10^{+88}:\\ \;\;\;\;\frac{2}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)\right) \cdot \left(\frac{1}{\ell} \cdot \left(\frac{\sin k}{\ell} \cdot {t_m}^{3}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(\ell \cdot \sqrt{\frac{1}{{\left(t_m \cdot {\left(\sqrt[3]{k}\right)}^{2}\right)}^{3}}}\right)}^{2}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 4.5e-103)
    (/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt (/ t_m (cos k)))) 2.0))
    (if (<= t_m 3.2e+88)
      (/
       2.0
       (*
        (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))
        (* (/ 1.0 l) (* (/ (sin k) l) (pow t_m 3.0)))))
      (pow (* l (sqrt (/ 1.0 (pow (* t_m (pow (cbrt k) 2.0)) 3.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.5e-103) {
		tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt((t_m / cos(k)))), 2.0);
	} else if (t_m <= 3.2e+88) {
		tmp = 2.0 / ((tan(k) * (2.0 + pow((k / t_m), 2.0))) * ((1.0 / l) * ((sin(k) / l) * pow(t_m, 3.0))));
	} else {
		tmp = pow((l * sqrt((1.0 / pow((t_m * pow(cbrt(k), 2.0)), 3.0)))), 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.5e-103) {
		tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
	} else if (t_m <= 3.2e+88) {
		tmp = 2.0 / ((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))) * ((1.0 / l) * ((Math.sin(k) / l) * Math.pow(t_m, 3.0))));
	} else {
		tmp = Math.pow((l * Math.sqrt((1.0 / Math.pow((t_m * Math.pow(Math.cbrt(k), 2.0)), 3.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.5e-103)
		tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(Float64(t_m / cos(k)))) ^ 2.0));
	elseif (t_m <= 3.2e+88)
		tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(Float64(1.0 / l) * Float64(Float64(sin(k) / l) * (t_m ^ 3.0)))));
	else
		tmp = Float64(l * sqrt(Float64(1.0 / (Float64(t_m * (cbrt(k) ^ 2.0)) ^ 3.0)))) ^ 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.5e-103], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.2e+88], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 / l), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(l * N[Sqrt[N[(1.0 / N[Power[N[(t$95$m * N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.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 4.5 \cdot 10^{-103}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t_m}{\cos k}}\right)}^{2}}\\

\mathbf{elif}\;t_m \leq 3.2 \cdot 10^{+88}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)\right) \cdot \left(\frac{1}{\ell} \cdot \left(\frac{\sin k}{\ell} \cdot {t_m}^{3}\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;{\left(\ell \cdot \sqrt{\frac{1}{{\left(t_m \cdot {\left(\sqrt[3]{k}\right)}^{2}\right)}^{3}}}\right)}^{2}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 11: 78.3% 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}\;t_m \leq 6 \cdot 10^{-104}:\\ \;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t_m}{\cos k}}\right)}^{2}}\\ \mathbf{elif}\;t_m \leq 1.8 \cdot 10^{+93}:\\ \;\;\;\;\frac{2}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)\right) \cdot \left(\frac{1}{\ell} \cdot \left(\frac{\sin k}{\ell} \cdot {t_m}^{3}\right)\right)}\\ \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 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 6e-104)
    (/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt (/ t_m (cos k)))) 2.0))
    (if (<= t_m 1.8e+93)
      (/
       2.0
       (*
        (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))
        (* (/ 1.0 l) (* (/ (sin k) l) (pow t_m 3.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 <= 6e-104) {
		tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt((t_m / cos(k)))), 2.0);
	} else if (t_m <= 1.8e+93) {
		tmp = 2.0 / ((tan(k) * (2.0 + pow((k / t_m), 2.0))) * ((1.0 / l) * ((sin(k) / l) * pow(t_m, 3.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 <= 6d-104) then
        tmp = 2.0d0 / ((((k * sin(k)) / l) * sqrt((t_m / cos(k)))) ** 2.0d0)
    else if (t_m <= 1.8d+93) then
        tmp = 2.0d0 / ((tan(k) * (2.0d0 + ((k / t_m) ** 2.0d0))) * ((1.0d0 / l) * ((sin(k) / l) * (t_m ** 3.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 <= 6e-104) {
		tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
	} else if (t_m <= 1.8e+93) {
		tmp = 2.0 / ((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))) * ((1.0 / l) * ((Math.sin(k) / l) * Math.pow(t_m, 3.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 <= 6e-104:
		tmp = 2.0 / math.pow((((k * math.sin(k)) / l) * math.sqrt((t_m / math.cos(k)))), 2.0)
	elif t_m <= 1.8e+93:
		tmp = 2.0 / ((math.tan(k) * (2.0 + math.pow((k / t_m), 2.0))) * ((1.0 / l) * ((math.sin(k) / l) * math.pow(t_m, 3.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 <= 6e-104)
		tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(Float64(t_m / cos(k)))) ^ 2.0));
	elseif (t_m <= 1.8e+93)
		tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(Float64(1.0 / l) * Float64(Float64(sin(k) / l) * (t_m ^ 3.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 <= 6e-104)
		tmp = 2.0 / ((((k * sin(k)) / l) * sqrt((t_m / cos(k)))) ^ 2.0);
	elseif (t_m <= 1.8e+93)
		tmp = 2.0 / ((tan(k) * (2.0 + ((k / t_m) ^ 2.0))) * ((1.0 / l) * ((sin(k) / l) * (t_m ^ 3.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, 6e-104], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.8e+93], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 / l), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 6 \cdot 10^{-104}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t_m}{\cos k}}\right)}^{2}}\\

\mathbf{elif}\;t_m \leq 1.8 \cdot 10^{+93}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)\right) \cdot \left(\frac{1}{\ell} \cdot \left(\frac{\sin k}{\ell} \cdot {t_m}^{3}\right)\right)}\\

\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
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 12: 77.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}\;t_m \leq 1.6 \cdot 10^{-102}:\\ \;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t_m}{\cos k}}\right)}^{2}}\\ \mathbf{elif}\;t_m \leq 2.7 \cdot 10^{+93}:\\ \;\;\;\;\ell \cdot \left(\frac{\frac{\frac{2}{\tan k}}{{t_m}^{3}}}{\sin k} \cdot \frac{\ell}{2 + {\left(\frac{k}{t_m}\right)}^{2}}\right)\\ \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 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 1.6e-102)
    (/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt (/ t_m (cos k)))) 2.0))
    (if (<= t_m 2.7e+93)
      (*
       l
       (*
        (/ (/ (/ 2.0 (tan k)) (pow t_m 3.0)) (sin k))
        (/ l (+ 2.0 (pow (/ k t_m) 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 <= 1.6e-102) {
		tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt((t_m / cos(k)))), 2.0);
	} else if (t_m <= 2.7e+93) {
		tmp = l * ((((2.0 / tan(k)) / pow(t_m, 3.0)) / sin(k)) * (l / (2.0 + pow((k / t_m), 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 <= 1.6d-102) then
        tmp = 2.0d0 / ((((k * sin(k)) / l) * sqrt((t_m / cos(k)))) ** 2.0d0)
    else if (t_m <= 2.7d+93) then
        tmp = l * ((((2.0d0 / tan(k)) / (t_m ** 3.0d0)) / sin(k)) * (l / (2.0d0 + ((k / t_m) ** 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 <= 1.6e-102) {
		tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
	} else if (t_m <= 2.7e+93) {
		tmp = l * ((((2.0 / Math.tan(k)) / Math.pow(t_m, 3.0)) / Math.sin(k)) * (l / (2.0 + Math.pow((k / t_m), 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 <= 1.6e-102:
		tmp = 2.0 / math.pow((((k * math.sin(k)) / l) * math.sqrt((t_m / math.cos(k)))), 2.0)
	elif t_m <= 2.7e+93:
		tmp = l * ((((2.0 / math.tan(k)) / math.pow(t_m, 3.0)) / math.sin(k)) * (l / (2.0 + math.pow((k / t_m), 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 <= 1.6e-102)
		tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(Float64(t_m / cos(k)))) ^ 2.0));
	elseif (t_m <= 2.7e+93)
		tmp = Float64(l * Float64(Float64(Float64(Float64(2.0 / tan(k)) / (t_m ^ 3.0)) / sin(k)) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 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 <= 1.6e-102)
		tmp = 2.0 / ((((k * sin(k)) / l) * sqrt((t_m / cos(k)))) ^ 2.0);
	elseif (t_m <= 2.7e+93)
		tmp = l * ((((2.0 / tan(k)) / (t_m ^ 3.0)) / sin(k)) * (l / (2.0 + ((k / t_m) ^ 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, 1.6e-102], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.7e+93], N[(l * N[(N[(N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 1.6 \cdot 10^{-102}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t_m}{\cos k}}\right)}^{2}}\\

\mathbf{elif}\;t_m \leq 2.7 \cdot 10^{+93}:\\
\;\;\;\;\ell \cdot \left(\frac{\frac{\frac{2}{\tan k}}{{t_m}^{3}}}{\sin k} \cdot \frac{\ell}{2 + {\left(\frac{k}{t_m}\right)}^{2}}\right)\\

\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
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 13: 76.7% 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}\;t_m \leq 3.8 \cdot 10^{-104}:\\ \;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t_m}{\cos k}}\right)}^{2}}\\ \mathbf{elif}\;t_m \leq 2.5 \cdot 10^{+88}:\\ \;\;\;\;\frac{2}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)\right) \cdot \left(\sin k \cdot \frac{\frac{{t_m}^{3}}{\ell}}{\ell}\right)}\\ \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 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 3.8e-104)
    (/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt (/ t_m (cos k)))) 2.0))
    (if (<= t_m 2.5e+88)
      (/
       2.0
       (*
        (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))
        (* (sin k) (/ (/ (pow t_m 3.0) l) l))))
      (/ 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 <= 3.8e-104) {
		tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt((t_m / cos(k)))), 2.0);
	} else if (t_m <= 2.5e+88) {
		tmp = 2.0 / ((tan(k) * (2.0 + pow((k / t_m), 2.0))) * (sin(k) * ((pow(t_m, 3.0) / l) / l)));
	} 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 <= 3.8d-104) then
        tmp = 2.0d0 / ((((k * sin(k)) / l) * sqrt((t_m / cos(k)))) ** 2.0d0)
    else if (t_m <= 2.5d+88) then
        tmp = 2.0d0 / ((tan(k) * (2.0d0 + ((k / t_m) ** 2.0d0))) * (sin(k) * (((t_m ** 3.0d0) / l) / l)))
    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 <= 3.8e-104) {
		tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
	} else if (t_m <= 2.5e+88) {
		tmp = 2.0 / ((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))) * (Math.sin(k) * ((Math.pow(t_m, 3.0) / l) / l)));
	} 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 <= 3.8e-104:
		tmp = 2.0 / math.pow((((k * math.sin(k)) / l) * math.sqrt((t_m / math.cos(k)))), 2.0)
	elif t_m <= 2.5e+88:
		tmp = 2.0 / ((math.tan(k) * (2.0 + math.pow((k / t_m), 2.0))) * (math.sin(k) * ((math.pow(t_m, 3.0) / l) / l)))
	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 <= 3.8e-104)
		tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(Float64(t_m / cos(k)))) ^ 2.0));
	elseif (t_m <= 2.5e+88)
		tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(sin(k) * Float64(Float64((t_m ^ 3.0) / l) / l))));
	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 <= 3.8e-104)
		tmp = 2.0 / ((((k * sin(k)) / l) * sqrt((t_m / cos(k)))) ^ 2.0);
	elseif (t_m <= 2.5e+88)
		tmp = 2.0 / ((tan(k) * (2.0 + ((k / t_m) ^ 2.0))) * (sin(k) * (((t_m ^ 3.0) / l) / l)));
	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, 3.8e-104], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.5e+88], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $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 3.8 \cdot 10^{-104}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t_m}{\cos k}}\right)}^{2}}\\

\mathbf{elif}\;t_m \leq 2.5 \cdot 10^{+88}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)\right) \cdot \left(\sin k \cdot \frac{\frac{{t_m}^{3}}{\ell}}{\ell}\right)}\\

\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
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 14: 77.8% 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}\;t_m \leq 1.35 \cdot 10^{-104}:\\ \;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t_m}{\cos k}}\right)}^{2}}\\ \mathbf{elif}\;t_m \leq 6 \cdot 10^{+71}:\\ \;\;\;\;\frac{2}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)\right) \cdot \frac{\frac{\sin k}{\frac{\ell}{{t_m}^{3}}}}{\ell}}\\ \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 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 1.35e-104)
    (/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt (/ t_m (cos k)))) 2.0))
    (if (<= t_m 6e+71)
      (/
       2.0
       (*
        (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))
        (/ (/ (sin k) (/ l (pow t_m 3.0))) l)))
      (/ 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 <= 1.35e-104) {
		tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt((t_m / cos(k)))), 2.0);
	} else if (t_m <= 6e+71) {
		tmp = 2.0 / ((tan(k) * (2.0 + pow((k / t_m), 2.0))) * ((sin(k) / (l / pow(t_m, 3.0))) / l));
	} 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 <= 1.35d-104) then
        tmp = 2.0d0 / ((((k * sin(k)) / l) * sqrt((t_m / cos(k)))) ** 2.0d0)
    else if (t_m <= 6d+71) then
        tmp = 2.0d0 / ((tan(k) * (2.0d0 + ((k / t_m) ** 2.0d0))) * ((sin(k) / (l / (t_m ** 3.0d0))) / l))
    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 <= 1.35e-104) {
		tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
	} else if (t_m <= 6e+71) {
		tmp = 2.0 / ((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))) * ((Math.sin(k) / (l / Math.pow(t_m, 3.0))) / l));
	} 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 <= 1.35e-104:
		tmp = 2.0 / math.pow((((k * math.sin(k)) / l) * math.sqrt((t_m / math.cos(k)))), 2.0)
	elif t_m <= 6e+71:
		tmp = 2.0 / ((math.tan(k) * (2.0 + math.pow((k / t_m), 2.0))) * ((math.sin(k) / (l / math.pow(t_m, 3.0))) / l))
	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 <= 1.35e-104)
		tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(Float64(t_m / cos(k)))) ^ 2.0));
	elseif (t_m <= 6e+71)
		tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(Float64(sin(k) / Float64(l / (t_m ^ 3.0))) / l)));
	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 <= 1.35e-104)
		tmp = 2.0 / ((((k * sin(k)) / l) * sqrt((t_m / cos(k)))) ^ 2.0);
	elseif (t_m <= 6e+71)
		tmp = 2.0 / ((tan(k) * (2.0 + ((k / t_m) ^ 2.0))) * ((sin(k) / (l / (t_m ^ 3.0))) / l));
	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, 1.35e-104], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 6e+71], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] / N[(l / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $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 1.35 \cdot 10^{-104}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t_m}{\cos k}}\right)}^{2}}\\

\mathbf{elif}\;t_m \leq 6 \cdot 10^{+71}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)\right) \cdot \frac{\frac{\sin k}{\frac{\ell}{{t_m}^{3}}}}{\ell}}\\

\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
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 15: 74.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}\;t_m \leq 5.8 \cdot 10^{-102}:\\ \;\;\;\;\frac{2}{{\left(\sqrt{\frac{t_m}{\cos k}} \cdot \frac{k}{\frac{\ell}{\sin k}}\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 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 5.8e-102)
    (/ 2.0 (pow (* (sqrt (/ t_m (cos k))) (/ k (/ l (sin k)))) 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 <= 5.8e-102) {
		tmp = 2.0 / pow((sqrt((t_m / cos(k))) * (k / (l / sin(k)))), 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 <= 5.8d-102) then
        tmp = 2.0d0 / ((sqrt((t_m / cos(k))) * (k / (l / sin(k)))) ** 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 <= 5.8e-102) {
		tmp = 2.0 / Math.pow((Math.sqrt((t_m / Math.cos(k))) * (k / (l / Math.sin(k)))), 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 <= 5.8e-102:
		tmp = 2.0 / math.pow((math.sqrt((t_m / math.cos(k))) * (k / (l / math.sin(k)))), 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 <= 5.8e-102)
		tmp = Float64(2.0 / (Float64(sqrt(Float64(t_m / cos(k))) * Float64(k / Float64(l / sin(k)))) ^ 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 <= 5.8e-102)
		tmp = 2.0 / ((sqrt((t_m / cos(k))) * (k / (l / sin(k)))) ^ 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, 5.8e-102], N[(2.0 / N[Power[N[(N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(k / N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $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 5.8 \cdot 10^{-102}:\\
\;\;\;\;\frac{2}{{\left(\sqrt{\frac{t_m}{\cos k}} \cdot \frac{k}{\frac{\ell}{\sin k}}\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
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 16: 74.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}\;t_m \leq 4.6 \cdot 10^{-102}:\\ \;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t_m}{\cos k}}\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 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 4.6e-102)
    (/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt (/ t_m (cos k)))) 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.6e-102) {
		tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt((t_m / cos(k)))), 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.6d-102) then
        tmp = 2.0d0 / ((((k * sin(k)) / l) * sqrt((t_m / cos(k)))) ** 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.6e-102) {
		tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * Math.sqrt((t_m / Math.cos(k)))), 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.6e-102:
		tmp = 2.0 / math.pow((((k * math.sin(k)) / l) * math.sqrt((t_m / math.cos(k)))), 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.6e-102)
		tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(Float64(t_m / cos(k)))) ^ 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.6e-102)
		tmp = 2.0 / ((((k * sin(k)) / l) * sqrt((t_m / cos(k)))) ^ 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.6e-102], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $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.6 \cdot 10^{-102}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t_m}{\cos k}}\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
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 17: 66.9% accurate, 1.4× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \frac{2}{{\left(\frac{{t_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (* t_s (/ 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) {
	return t_s * (2.0 / pow(((pow(t_m, 1.5) / l) * (k * sqrt(2.0))), 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 * (2.0d0 / ((((t_m ** 1.5d0) / l) * (k * sqrt(2.0d0))) ** 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 * (2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.sqrt(2.0))), 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 * (2.0 / math.pow(((math.pow(t_m, 1.5) / l) * (k * math.sqrt(2.0))), 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(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * sqrt(2.0))) ^ 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 * (2.0 / ((((t_m ^ 1.5) / l) * (k * sqrt(2.0))) ^ 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[(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 \frac{2}{{\left(\frac{{t_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 18: 62.3% 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 70000:\\ \;\;\;\;\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}:\\ \;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t_m \cdot {k}^{4}\right)}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 70000.0)
    (/ 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 <= 70000.0) {
		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 <= 70000.0d0) 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 <= 70000.0) {
		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 <= 70000.0:
		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 <= 70000.0)
		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 <= 70000.0)
		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, 70000.0], 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 70000:\\
\;\;\;\;\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}:\\
\;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t_m \cdot {k}^{4}\right)}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 19: 61.4% 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 27000:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \frac{\frac{\sin k}{\frac{\ell}{{t_m}^{3}}}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t_m \cdot {k}^{4}\right)}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 27000.0)
    (/ 2.0 (* (* 2.0 k) (/ (/ (sin k) (/ l (pow t_m 3.0))) 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 <= 27000.0) {
		tmp = 2.0 / ((2.0 * k) * ((sin(k) / (l / pow(t_m, 3.0))) / 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 <= 27000.0d0) then
        tmp = 2.0d0 / ((2.0d0 * k) * ((sin(k) / (l / (t_m ** 3.0d0))) / 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 <= 27000.0) {
		tmp = 2.0 / ((2.0 * k) * ((Math.sin(k) / (l / Math.pow(t_m, 3.0))) / 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 <= 27000.0:
		tmp = 2.0 / ((2.0 * k) * ((math.sin(k) / (l / math.pow(t_m, 3.0))) / 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 <= 27000.0)
		tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(Float64(sin(k) / Float64(l / (t_m ^ 3.0))) / 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 <= 27000.0)
		tmp = 2.0 / ((2.0 * k) * ((sin(k) / (l / (t_m ^ 3.0))) / 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, 27000.0], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] / N[(l / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $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 27000:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \frac{\frac{\sin k}{\frac{\ell}{{t_m}^{3}}}}{\ell}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t_m \cdot {k}^{4}\right)}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 20: 51.8% 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 1 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
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 21: 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 \left(\frac{2}{t_m} \cdot \frac{{\ell}^{2}}{{k}^{4}}\right) \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (* t_s (* (/ 2.0 t_m) (/ (pow l 2.0) (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 / t_m) * (pow(l, 2.0) / 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 / t_m) * ((l ** 2.0d0) / (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 / t_m) * (Math.pow(l, 2.0) / 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 / t_m) * (math.pow(l, 2.0) / 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(Float64(2.0 / t_m) * Float64((l ^ 2.0) / (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 / t_m) * ((l ^ 2.0) / (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[(N[(2.0 / t$95$m), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \left(\frac{2}{t_m} \cdot \frac{{\ell}^{2}}{{k}^{4}}\right)
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 22: 51.8% accurate, 2.0× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \frac{2}{{\ell}^{-2} \cdot \left(t_m \cdot {k}^{4}\right)} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 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 \frac{2}{{\ell}^{-2} \cdot \left(t_m \cdot {k}^{4}\right)}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Reproduce

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