Toniolo and Linder, Equation (10-)

Percentage Accurate: 34.9% → 75.9%
Time: 31.2s
Alternatives: 17
Speedup: 2.0×

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 17 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: 34.9% 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: 75.9% accurate, 0.8× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;l_m \leq 4.6 \cdot 10^{-190}:\\ \;\;\;\;2 \cdot \frac{e^{2 \cdot \log l_m + \log \left({k}^{-4}\right)}}{t}\\ \mathbf{elif}\;l_m \leq 6.5 \cdot 10^{+158}:\\ \;\;\;\;\frac{2}{{k}^{2} \cdot \left({l_m}^{-2} \cdot \left(\frac{t}{\cos k} \cdot {\sin k}^{2}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{2}{\sin k \cdot \left({\left(\frac{t}{\sqrt[3]{\frac{l_m}{\tan k}}}\right)}^{3} \cdot \frac{1}{l_m}\right)}}{{\left(\frac{k}{t}\right)}^{2}}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k)
 :precision binary64
 (if (<= l_m 4.6e-190)
   (* 2.0 (/ (exp (+ (* 2.0 (log l_m)) (log (pow k -4.0)))) t))
   (if (<= l_m 6.5e+158)
     (/
      2.0
      (* (pow k 2.0) (* (pow l_m -2.0) (* (/ t (cos k)) (pow (sin k) 2.0)))))
     (/
      (/
       2.0
       (* (sin k) (* (pow (/ t (cbrt (/ l_m (tan k)))) 3.0) (/ 1.0 l_m))))
      (pow (/ k t) 2.0)))))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	double tmp;
	if (l_m <= 4.6e-190) {
		tmp = 2.0 * (exp(((2.0 * log(l_m)) + log(pow(k, -4.0)))) / t);
	} else if (l_m <= 6.5e+158) {
		tmp = 2.0 / (pow(k, 2.0) * (pow(l_m, -2.0) * ((t / cos(k)) * pow(sin(k), 2.0))));
	} else {
		tmp = (2.0 / (sin(k) * (pow((t / cbrt((l_m / tan(k)))), 3.0) * (1.0 / l_m)))) / pow((k / t), 2.0);
	}
	return tmp;
}
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	double tmp;
	if (l_m <= 4.6e-190) {
		tmp = 2.0 * (Math.exp(((2.0 * Math.log(l_m)) + Math.log(Math.pow(k, -4.0)))) / t);
	} else if (l_m <= 6.5e+158) {
		tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(l_m, -2.0) * ((t / Math.cos(k)) * Math.pow(Math.sin(k), 2.0))));
	} else {
		tmp = (2.0 / (Math.sin(k) * (Math.pow((t / Math.cbrt((l_m / Math.tan(k)))), 3.0) * (1.0 / l_m)))) / Math.pow((k / t), 2.0);
	}
	return tmp;
}
l_m = abs(l)
function code(t, l_m, k)
	tmp = 0.0
	if (l_m <= 4.6e-190)
		tmp = Float64(2.0 * Float64(exp(Float64(Float64(2.0 * log(l_m)) + log((k ^ -4.0)))) / t));
	elseif (l_m <= 6.5e+158)
		tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((l_m ^ -2.0) * Float64(Float64(t / cos(k)) * (sin(k) ^ 2.0)))));
	else
		tmp = Float64(Float64(2.0 / Float64(sin(k) * Float64((Float64(t / cbrt(Float64(l_m / tan(k)))) ^ 3.0) * Float64(1.0 / l_m)))) / (Float64(k / t) ^ 2.0));
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := If[LessEqual[l$95$m, 4.6e-190], N[(2.0 * N[(N[Exp[N[(N[(2.0 * N[Log[l$95$m], $MachinePrecision]), $MachinePrecision] + N[Log[N[Power[k, -4.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[l$95$m, 6.5e+158], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[l$95$m, -2.0], $MachinePrecision] * N[(N[(t / N[Cos[k], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(N[Power[N[(t / N[Power[N[(l$95$m / N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(1.0 / l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;l_m \leq 4.6 \cdot 10^{-190}:\\
\;\;\;\;2 \cdot \frac{e^{2 \cdot \log l_m + \log \left({k}^{-4}\right)}}{t}\\

\mathbf{elif}\;l_m \leq 6.5 \cdot 10^{+158}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({l_m}^{-2} \cdot \left(\frac{t}{\cos k} \cdot {\sin k}^{2}\right)\right)}\\

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


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

Alternative 2: 72.1% accurate, 0.8× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;k \leq 3.8 \cdot 10^{-144} \lor \neg \left(k \leq 1.35 \cdot 10^{+154}\right):\\ \;\;\;\;2 \cdot \frac{e^{2 \cdot \log l_m + \log \left({k}^{-4}\right)}}{t}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\frac{\frac{{l_m}^{2}}{t}}{{k}^{2}} \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k)
 :precision binary64
 (if (or (<= k 3.8e-144) (not (<= k 1.35e+154)))
   (* 2.0 (/ (exp (+ (* 2.0 (log l_m)) (log (pow k -4.0)))) t))
   (*
    2.0
    (* (/ (/ (pow l_m 2.0) t) (pow k 2.0)) (/ (cos k) (pow (sin k) 2.0))))))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	double tmp;
	if ((k <= 3.8e-144) || !(k <= 1.35e+154)) {
		tmp = 2.0 * (exp(((2.0 * log(l_m)) + log(pow(k, -4.0)))) / t);
	} else {
		tmp = 2.0 * (((pow(l_m, 2.0) / t) / pow(k, 2.0)) * (cos(k) / pow(sin(k), 2.0)));
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(t, l_m, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k
    real(8) :: tmp
    if ((k <= 3.8d-144) .or. (.not. (k <= 1.35d+154))) then
        tmp = 2.0d0 * (exp(((2.0d0 * log(l_m)) + log((k ** (-4.0d0))))) / t)
    else
        tmp = 2.0d0 * ((((l_m ** 2.0d0) / t) / (k ** 2.0d0)) * (cos(k) / (sin(k) ** 2.0d0)))
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	double tmp;
	if ((k <= 3.8e-144) || !(k <= 1.35e+154)) {
		tmp = 2.0 * (Math.exp(((2.0 * Math.log(l_m)) + Math.log(Math.pow(k, -4.0)))) / t);
	} else {
		tmp = 2.0 * (((Math.pow(l_m, 2.0) / t) / Math.pow(k, 2.0)) * (Math.cos(k) / Math.pow(Math.sin(k), 2.0)));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(t, l_m, k):
	tmp = 0
	if (k <= 3.8e-144) or not (k <= 1.35e+154):
		tmp = 2.0 * (math.exp(((2.0 * math.log(l_m)) + math.log(math.pow(k, -4.0)))) / t)
	else:
		tmp = 2.0 * (((math.pow(l_m, 2.0) / t) / math.pow(k, 2.0)) * (math.cos(k) / math.pow(math.sin(k), 2.0)))
	return tmp
l_m = abs(l)
function code(t, l_m, k)
	tmp = 0.0
	if ((k <= 3.8e-144) || !(k <= 1.35e+154))
		tmp = Float64(2.0 * Float64(exp(Float64(Float64(2.0 * log(l_m)) + log((k ^ -4.0)))) / t));
	else
		tmp = Float64(2.0 * Float64(Float64(Float64((l_m ^ 2.0) / t) / (k ^ 2.0)) * Float64(cos(k) / (sin(k) ^ 2.0))));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(t, l_m, k)
	tmp = 0.0;
	if ((k <= 3.8e-144) || ~((k <= 1.35e+154)))
		tmp = 2.0 * (exp(((2.0 * log(l_m)) + log((k ^ -4.0)))) / t);
	else
		tmp = 2.0 * ((((l_m ^ 2.0) / t) / (k ^ 2.0)) * (cos(k) / (sin(k) ^ 2.0)));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := If[Or[LessEqual[k, 3.8e-144], N[Not[LessEqual[k, 1.35e+154]], $MachinePrecision]], N[(2.0 * N[(N[Exp[N[(N[(2.0 * N[Log[l$95$m], $MachinePrecision]), $MachinePrecision] + N[Log[N[Power[k, -4.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] / t), $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;k \leq 3.8 \cdot 10^{-144} \lor \neg \left(k \leq 1.35 \cdot 10^{+154}\right):\\
\;\;\;\;2 \cdot \frac{e^{2 \cdot \log l_m + \log \left({k}^{-4}\right)}}{t}\\

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


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

Alternative 3: 72.4% accurate, 0.8× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;k \leq 1.6 \cdot 10^{-151} \lor \neg \left(k \leq 1.35 \cdot 10^{+154}\right):\\ \;\;\;\;2 \cdot \frac{e^{2 \cdot \log l_m + \log \left({k}^{-4}\right)}}{t}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{\frac{\cos k \cdot {l_m}^{2}}{{k}^{2}}}{t \cdot {\sin k}^{2}}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k)
 :precision binary64
 (if (or (<= k 1.6e-151) (not (<= k 1.35e+154)))
   (* 2.0 (/ (exp (+ (* 2.0 (log l_m)) (log (pow k -4.0)))) t))
   (*
    2.0
    (/ (/ (* (cos k) (pow l_m 2.0)) (pow k 2.0)) (* t (pow (sin k) 2.0))))))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	double tmp;
	if ((k <= 1.6e-151) || !(k <= 1.35e+154)) {
		tmp = 2.0 * (exp(((2.0 * log(l_m)) + log(pow(k, -4.0)))) / t);
	} else {
		tmp = 2.0 * (((cos(k) * pow(l_m, 2.0)) / pow(k, 2.0)) / (t * pow(sin(k), 2.0)));
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(t, l_m, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k
    real(8) :: tmp
    if ((k <= 1.6d-151) .or. (.not. (k <= 1.35d+154))) then
        tmp = 2.0d0 * (exp(((2.0d0 * log(l_m)) + log((k ** (-4.0d0))))) / t)
    else
        tmp = 2.0d0 * (((cos(k) * (l_m ** 2.0d0)) / (k ** 2.0d0)) / (t * (sin(k) ** 2.0d0)))
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	double tmp;
	if ((k <= 1.6e-151) || !(k <= 1.35e+154)) {
		tmp = 2.0 * (Math.exp(((2.0 * Math.log(l_m)) + Math.log(Math.pow(k, -4.0)))) / t);
	} else {
		tmp = 2.0 * (((Math.cos(k) * Math.pow(l_m, 2.0)) / Math.pow(k, 2.0)) / (t * Math.pow(Math.sin(k), 2.0)));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(t, l_m, k):
	tmp = 0
	if (k <= 1.6e-151) or not (k <= 1.35e+154):
		tmp = 2.0 * (math.exp(((2.0 * math.log(l_m)) + math.log(math.pow(k, -4.0)))) / t)
	else:
		tmp = 2.0 * (((math.cos(k) * math.pow(l_m, 2.0)) / math.pow(k, 2.0)) / (t * math.pow(math.sin(k), 2.0)))
	return tmp
l_m = abs(l)
function code(t, l_m, k)
	tmp = 0.0
	if ((k <= 1.6e-151) || !(k <= 1.35e+154))
		tmp = Float64(2.0 * Float64(exp(Float64(Float64(2.0 * log(l_m)) + log((k ^ -4.0)))) / t));
	else
		tmp = Float64(2.0 * Float64(Float64(Float64(cos(k) * (l_m ^ 2.0)) / (k ^ 2.0)) / Float64(t * (sin(k) ^ 2.0))));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(t, l_m, k)
	tmp = 0.0;
	if ((k <= 1.6e-151) || ~((k <= 1.35e+154)))
		tmp = 2.0 * (exp(((2.0 * log(l_m)) + log((k ^ -4.0)))) / t);
	else
		tmp = 2.0 * (((cos(k) * (l_m ^ 2.0)) / (k ^ 2.0)) / (t * (sin(k) ^ 2.0)));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := If[Or[LessEqual[k, 1.6e-151], N[Not[LessEqual[k, 1.35e+154]], $MachinePrecision]], N[(2.0 * N[(N[Exp[N[(N[(2.0 * N[Log[l$95$m], $MachinePrecision]), $MachinePrecision] + N[Log[N[Power[k, -4.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(N[Cos[k], $MachinePrecision] * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.6 \cdot 10^{-151} \lor \neg \left(k \leq 1.35 \cdot 10^{+154}\right):\\
\;\;\;\;2 \cdot \frac{e^{2 \cdot \log l_m + \log \left({k}^{-4}\right)}}{t}\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\frac{\cos k \cdot {l_m}^{2}}{{k}^{2}}}{t \cdot {\sin k}^{2}}\\


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

Alternative 4: 72.5% accurate, 0.8× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;k \leq 1.2 \cdot 10^{-151} \lor \neg \left(k \leq 1.35 \cdot 10^{+154}\right):\\ \;\;\;\;2 \cdot \frac{e^{2 \cdot \log l_m + \log \left({k}^{-4}\right)}}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{k}^{2}} \cdot \frac{\cos k \cdot {l_m}^{2}}{t \cdot {\sin k}^{2}}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k)
 :precision binary64
 (if (or (<= k 1.2e-151) (not (<= k 1.35e+154)))
   (* 2.0 (/ (exp (+ (* 2.0 (log l_m)) (log (pow k -4.0)))) t))
   (*
    (/ 2.0 (pow k 2.0))
    (/ (* (cos k) (pow l_m 2.0)) (* t (pow (sin k) 2.0))))))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	double tmp;
	if ((k <= 1.2e-151) || !(k <= 1.35e+154)) {
		tmp = 2.0 * (exp(((2.0 * log(l_m)) + log(pow(k, -4.0)))) / t);
	} else {
		tmp = (2.0 / pow(k, 2.0)) * ((cos(k) * pow(l_m, 2.0)) / (t * pow(sin(k), 2.0)));
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(t, l_m, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k
    real(8) :: tmp
    if ((k <= 1.2d-151) .or. (.not. (k <= 1.35d+154))) then
        tmp = 2.0d0 * (exp(((2.0d0 * log(l_m)) + log((k ** (-4.0d0))))) / t)
    else
        tmp = (2.0d0 / (k ** 2.0d0)) * ((cos(k) * (l_m ** 2.0d0)) / (t * (sin(k) ** 2.0d0)))
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	double tmp;
	if ((k <= 1.2e-151) || !(k <= 1.35e+154)) {
		tmp = 2.0 * (Math.exp(((2.0 * Math.log(l_m)) + Math.log(Math.pow(k, -4.0)))) / t);
	} else {
		tmp = (2.0 / Math.pow(k, 2.0)) * ((Math.cos(k) * Math.pow(l_m, 2.0)) / (t * Math.pow(Math.sin(k), 2.0)));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(t, l_m, k):
	tmp = 0
	if (k <= 1.2e-151) or not (k <= 1.35e+154):
		tmp = 2.0 * (math.exp(((2.0 * math.log(l_m)) + math.log(math.pow(k, -4.0)))) / t)
	else:
		tmp = (2.0 / math.pow(k, 2.0)) * ((math.cos(k) * math.pow(l_m, 2.0)) / (t * math.pow(math.sin(k), 2.0)))
	return tmp
l_m = abs(l)
function code(t, l_m, k)
	tmp = 0.0
	if ((k <= 1.2e-151) || !(k <= 1.35e+154))
		tmp = Float64(2.0 * Float64(exp(Float64(Float64(2.0 * log(l_m)) + log((k ^ -4.0)))) / t));
	else
		tmp = Float64(Float64(2.0 / (k ^ 2.0)) * Float64(Float64(cos(k) * (l_m ^ 2.0)) / Float64(t * (sin(k) ^ 2.0))));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(t, l_m, k)
	tmp = 0.0;
	if ((k <= 1.2e-151) || ~((k <= 1.35e+154)))
		tmp = 2.0 * (exp(((2.0 * log(l_m)) + log((k ^ -4.0)))) / t);
	else
		tmp = (2.0 / (k ^ 2.0)) * ((cos(k) * (l_m ^ 2.0)) / (t * (sin(k) ^ 2.0)));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := If[Or[LessEqual[k, 1.2e-151], N[Not[LessEqual[k, 1.35e+154]], $MachinePrecision]], N[(2.0 * N[(N[Exp[N[(N[(2.0 * N[Log[l$95$m], $MachinePrecision]), $MachinePrecision] + N[Log[N[Power[k, -4.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.2 \cdot 10^{-151} \lor \neg \left(k \leq 1.35 \cdot 10^{+154}\right):\\
\;\;\;\;2 \cdot \frac{e^{2 \cdot \log l_m + \log \left({k}^{-4}\right)}}{t}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{{k}^{2}} \cdot \frac{\cos k \cdot {l_m}^{2}}{t \cdot {\sin k}^{2}}\\


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

Alternative 5: 72.3% accurate, 0.8× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;k \leq 2.4 \cdot 10^{-151} \lor \neg \left(k \leq 1.35 \cdot 10^{+154}\right):\\ \;\;\;\;2 \cdot \frac{e^{2 \cdot \log l_m + \log \left({k}^{-4}\right)}}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{k}^{2} \cdot \left({l_m}^{-2} \cdot \left(\frac{t}{\cos k} \cdot {\sin k}^{2}\right)\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k)
 :precision binary64
 (if (or (<= k 2.4e-151) (not (<= k 1.35e+154)))
   (* 2.0 (/ (exp (+ (* 2.0 (log l_m)) (log (pow k -4.0)))) t))
   (/
    2.0
    (* (pow k 2.0) (* (pow l_m -2.0) (* (/ t (cos k)) (pow (sin k) 2.0)))))))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	double tmp;
	if ((k <= 2.4e-151) || !(k <= 1.35e+154)) {
		tmp = 2.0 * (exp(((2.0 * log(l_m)) + log(pow(k, -4.0)))) / t);
	} else {
		tmp = 2.0 / (pow(k, 2.0) * (pow(l_m, -2.0) * ((t / cos(k)) * pow(sin(k), 2.0))));
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(t, l_m, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k
    real(8) :: tmp
    if ((k <= 2.4d-151) .or. (.not. (k <= 1.35d+154))) then
        tmp = 2.0d0 * (exp(((2.0d0 * log(l_m)) + log((k ** (-4.0d0))))) / t)
    else
        tmp = 2.0d0 / ((k ** 2.0d0) * ((l_m ** (-2.0d0)) * ((t / cos(k)) * (sin(k) ** 2.0d0))))
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	double tmp;
	if ((k <= 2.4e-151) || !(k <= 1.35e+154)) {
		tmp = 2.0 * (Math.exp(((2.0 * Math.log(l_m)) + Math.log(Math.pow(k, -4.0)))) / t);
	} else {
		tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(l_m, -2.0) * ((t / Math.cos(k)) * Math.pow(Math.sin(k), 2.0))));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(t, l_m, k):
	tmp = 0
	if (k <= 2.4e-151) or not (k <= 1.35e+154):
		tmp = 2.0 * (math.exp(((2.0 * math.log(l_m)) + math.log(math.pow(k, -4.0)))) / t)
	else:
		tmp = 2.0 / (math.pow(k, 2.0) * (math.pow(l_m, -2.0) * ((t / math.cos(k)) * math.pow(math.sin(k), 2.0))))
	return tmp
l_m = abs(l)
function code(t, l_m, k)
	tmp = 0.0
	if ((k <= 2.4e-151) || !(k <= 1.35e+154))
		tmp = Float64(2.0 * Float64(exp(Float64(Float64(2.0 * log(l_m)) + log((k ^ -4.0)))) / t));
	else
		tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((l_m ^ -2.0) * Float64(Float64(t / cos(k)) * (sin(k) ^ 2.0)))));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(t, l_m, k)
	tmp = 0.0;
	if ((k <= 2.4e-151) || ~((k <= 1.35e+154)))
		tmp = 2.0 * (exp(((2.0 * log(l_m)) + log((k ^ -4.0)))) / t);
	else
		tmp = 2.0 / ((k ^ 2.0) * ((l_m ^ -2.0) * ((t / cos(k)) * (sin(k) ^ 2.0))));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := If[Or[LessEqual[k, 2.4e-151], N[Not[LessEqual[k, 1.35e+154]], $MachinePrecision]], N[(2.0 * N[(N[Exp[N[(N[(2.0 * N[Log[l$95$m], $MachinePrecision]), $MachinePrecision] + N[Log[N[Power[k, -4.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[l$95$m, -2.0], $MachinePrecision] * N[(N[(t / N[Cos[k], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.4 \cdot 10^{-151} \lor \neg \left(k \leq 1.35 \cdot 10^{+154}\right):\\
\;\;\;\;2 \cdot \frac{e^{2 \cdot \log l_m + \log \left({k}^{-4}\right)}}{t}\\

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


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

Alternative 6: 72.3% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := 2 \cdot \frac{e^{2 \cdot \log l_m + \log \left({k}^{-4}\right)}}{t}\\ \mathbf{if}\;k \leq 2.4 \cdot 10^{-151}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;k \leq 0.000105:\\ \;\;\;\;\frac{2}{{k}^{2} \cdot \left({l_m}^{-2} \cdot \left(t \cdot {k}^{2}\right)\right)}\\ \mathbf{elif}\;k \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;\frac{2}{{k}^{2}} \cdot \frac{{l_m}^{2}}{\frac{t}{\cos k} \cdot \frac{1 - \cos \left(2 \cdot k\right)}{2}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k)
 :precision binary64
 (let* ((t_1 (* 2.0 (/ (exp (+ (* 2.0 (log l_m)) (log (pow k -4.0)))) t))))
   (if (<= k 2.4e-151)
     t_1
     (if (<= k 0.000105)
       (/ 2.0 (* (pow k 2.0) (* (pow l_m -2.0) (* t (pow k 2.0)))))
       (if (<= k 1.35e+154)
         (*
          (/ 2.0 (pow k 2.0))
          (/ (pow l_m 2.0) (* (/ t (cos k)) (/ (- 1.0 (cos (* 2.0 k))) 2.0))))
         t_1)))))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	double t_1 = 2.0 * (exp(((2.0 * log(l_m)) + log(pow(k, -4.0)))) / t);
	double tmp;
	if (k <= 2.4e-151) {
		tmp = t_1;
	} else if (k <= 0.000105) {
		tmp = 2.0 / (pow(k, 2.0) * (pow(l_m, -2.0) * (t * pow(k, 2.0))));
	} else if (k <= 1.35e+154) {
		tmp = (2.0 / pow(k, 2.0)) * (pow(l_m, 2.0) / ((t / cos(k)) * ((1.0 - cos((2.0 * k))) / 2.0)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(t, l_m, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: tmp
    t_1 = 2.0d0 * (exp(((2.0d0 * log(l_m)) + log((k ** (-4.0d0))))) / t)
    if (k <= 2.4d-151) then
        tmp = t_1
    else if (k <= 0.000105d0) then
        tmp = 2.0d0 / ((k ** 2.0d0) * ((l_m ** (-2.0d0)) * (t * (k ** 2.0d0))))
    else if (k <= 1.35d+154) then
        tmp = (2.0d0 / (k ** 2.0d0)) * ((l_m ** 2.0d0) / ((t / cos(k)) * ((1.0d0 - cos((2.0d0 * k))) / 2.0d0)))
    else
        tmp = t_1
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	double t_1 = 2.0 * (Math.exp(((2.0 * Math.log(l_m)) + Math.log(Math.pow(k, -4.0)))) / t);
	double tmp;
	if (k <= 2.4e-151) {
		tmp = t_1;
	} else if (k <= 0.000105) {
		tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(l_m, -2.0) * (t * Math.pow(k, 2.0))));
	} else if (k <= 1.35e+154) {
		tmp = (2.0 / Math.pow(k, 2.0)) * (Math.pow(l_m, 2.0) / ((t / Math.cos(k)) * ((1.0 - Math.cos((2.0 * k))) / 2.0)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
l_m = math.fabs(l)
def code(t, l_m, k):
	t_1 = 2.0 * (math.exp(((2.0 * math.log(l_m)) + math.log(math.pow(k, -4.0)))) / t)
	tmp = 0
	if k <= 2.4e-151:
		tmp = t_1
	elif k <= 0.000105:
		tmp = 2.0 / (math.pow(k, 2.0) * (math.pow(l_m, -2.0) * (t * math.pow(k, 2.0))))
	elif k <= 1.35e+154:
		tmp = (2.0 / math.pow(k, 2.0)) * (math.pow(l_m, 2.0) / ((t / math.cos(k)) * ((1.0 - math.cos((2.0 * k))) / 2.0)))
	else:
		tmp = t_1
	return tmp
l_m = abs(l)
function code(t, l_m, k)
	t_1 = Float64(2.0 * Float64(exp(Float64(Float64(2.0 * log(l_m)) + log((k ^ -4.0)))) / t))
	tmp = 0.0
	if (k <= 2.4e-151)
		tmp = t_1;
	elseif (k <= 0.000105)
		tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((l_m ^ -2.0) * Float64(t * (k ^ 2.0)))));
	elseif (k <= 1.35e+154)
		tmp = Float64(Float64(2.0 / (k ^ 2.0)) * Float64((l_m ^ 2.0) / Float64(Float64(t / cos(k)) * Float64(Float64(1.0 - cos(Float64(2.0 * k))) / 2.0))));
	else
		tmp = t_1;
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(t, l_m, k)
	t_1 = 2.0 * (exp(((2.0 * log(l_m)) + log((k ^ -4.0)))) / t);
	tmp = 0.0;
	if (k <= 2.4e-151)
		tmp = t_1;
	elseif (k <= 0.000105)
		tmp = 2.0 / ((k ^ 2.0) * ((l_m ^ -2.0) * (t * (k ^ 2.0))));
	elseif (k <= 1.35e+154)
		tmp = (2.0 / (k ^ 2.0)) * ((l_m ^ 2.0) / ((t / cos(k)) * ((1.0 - cos((2.0 * k))) / 2.0)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := Block[{t$95$1 = N[(2.0 * N[(N[Exp[N[(N[(2.0 * N[Log[l$95$m], $MachinePrecision]), $MachinePrecision] + N[Log[N[Power[k, -4.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 2.4e-151], t$95$1, If[LessEqual[k, 0.000105], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[l$95$m, -2.0], $MachinePrecision] * N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.35e+154], N[(N[(2.0 / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / N[(N[(t / N[Cos[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 - N[Cos[N[(2.0 * k), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := 2 \cdot \frac{e^{2 \cdot \log l_m + \log \left({k}^{-4}\right)}}{t}\\
\mathbf{if}\;k \leq 2.4 \cdot 10^{-151}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;k \leq 0.000105:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({l_m}^{-2} \cdot \left(t \cdot {k}^{2}\right)\right)}\\

\mathbf{elif}\;k \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;\frac{2}{{k}^{2}} \cdot \frac{{l_m}^{2}}{\frac{t}{\cos k} \cdot \frac{1 - \cos \left(2 \cdot k\right)}{2}}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


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

Alternative 7: 72.2% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := 2 \cdot \frac{e^{2 \cdot \log l_m + \log \left({k}^{-4}\right)}}{t}\\ \mathbf{if}\;k \leq 1.7 \cdot 10^{-151}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;k \leq 0.000105:\\ \;\;\;\;\frac{2}{{k}^{2} \cdot \left({l_m}^{-2} \cdot \left(t \cdot {k}^{2}\right)\right)}\\ \mathbf{elif}\;k \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;\frac{2}{{k}^{2} \cdot \left({l_m}^{-2} \cdot \left(\frac{t}{\cos k} \cdot \frac{1 - \cos \left(2 \cdot k\right)}{2}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k)
 :precision binary64
 (let* ((t_1 (* 2.0 (/ (exp (+ (* 2.0 (log l_m)) (log (pow k -4.0)))) t))))
   (if (<= k 1.7e-151)
     t_1
     (if (<= k 0.000105)
       (/ 2.0 (* (pow k 2.0) (* (pow l_m -2.0) (* t (pow k 2.0)))))
       (if (<= k 1.35e+154)
         (/
          2.0
          (*
           (pow k 2.0)
           (*
            (pow l_m -2.0)
            (* (/ t (cos k)) (/ (- 1.0 (cos (* 2.0 k))) 2.0)))))
         t_1)))))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	double t_1 = 2.0 * (exp(((2.0 * log(l_m)) + log(pow(k, -4.0)))) / t);
	double tmp;
	if (k <= 1.7e-151) {
		tmp = t_1;
	} else if (k <= 0.000105) {
		tmp = 2.0 / (pow(k, 2.0) * (pow(l_m, -2.0) * (t * pow(k, 2.0))));
	} else if (k <= 1.35e+154) {
		tmp = 2.0 / (pow(k, 2.0) * (pow(l_m, -2.0) * ((t / cos(k)) * ((1.0 - cos((2.0 * k))) / 2.0))));
	} else {
		tmp = t_1;
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(t, l_m, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: tmp
    t_1 = 2.0d0 * (exp(((2.0d0 * log(l_m)) + log((k ** (-4.0d0))))) / t)
    if (k <= 1.7d-151) then
        tmp = t_1
    else if (k <= 0.000105d0) then
        tmp = 2.0d0 / ((k ** 2.0d0) * ((l_m ** (-2.0d0)) * (t * (k ** 2.0d0))))
    else if (k <= 1.35d+154) then
        tmp = 2.0d0 / ((k ** 2.0d0) * ((l_m ** (-2.0d0)) * ((t / cos(k)) * ((1.0d0 - cos((2.0d0 * k))) / 2.0d0))))
    else
        tmp = t_1
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	double t_1 = 2.0 * (Math.exp(((2.0 * Math.log(l_m)) + Math.log(Math.pow(k, -4.0)))) / t);
	double tmp;
	if (k <= 1.7e-151) {
		tmp = t_1;
	} else if (k <= 0.000105) {
		tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(l_m, -2.0) * (t * Math.pow(k, 2.0))));
	} else if (k <= 1.35e+154) {
		tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(l_m, -2.0) * ((t / Math.cos(k)) * ((1.0 - Math.cos((2.0 * k))) / 2.0))));
	} else {
		tmp = t_1;
	}
	return tmp;
}
l_m = math.fabs(l)
def code(t, l_m, k):
	t_1 = 2.0 * (math.exp(((2.0 * math.log(l_m)) + math.log(math.pow(k, -4.0)))) / t)
	tmp = 0
	if k <= 1.7e-151:
		tmp = t_1
	elif k <= 0.000105:
		tmp = 2.0 / (math.pow(k, 2.0) * (math.pow(l_m, -2.0) * (t * math.pow(k, 2.0))))
	elif k <= 1.35e+154:
		tmp = 2.0 / (math.pow(k, 2.0) * (math.pow(l_m, -2.0) * ((t / math.cos(k)) * ((1.0 - math.cos((2.0 * k))) / 2.0))))
	else:
		tmp = t_1
	return tmp
l_m = abs(l)
function code(t, l_m, k)
	t_1 = Float64(2.0 * Float64(exp(Float64(Float64(2.0 * log(l_m)) + log((k ^ -4.0)))) / t))
	tmp = 0.0
	if (k <= 1.7e-151)
		tmp = t_1;
	elseif (k <= 0.000105)
		tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((l_m ^ -2.0) * Float64(t * (k ^ 2.0)))));
	elseif (k <= 1.35e+154)
		tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((l_m ^ -2.0) * Float64(Float64(t / cos(k)) * Float64(Float64(1.0 - cos(Float64(2.0 * k))) / 2.0)))));
	else
		tmp = t_1;
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(t, l_m, k)
	t_1 = 2.0 * (exp(((2.0 * log(l_m)) + log((k ^ -4.0)))) / t);
	tmp = 0.0;
	if (k <= 1.7e-151)
		tmp = t_1;
	elseif (k <= 0.000105)
		tmp = 2.0 / ((k ^ 2.0) * ((l_m ^ -2.0) * (t * (k ^ 2.0))));
	elseif (k <= 1.35e+154)
		tmp = 2.0 / ((k ^ 2.0) * ((l_m ^ -2.0) * ((t / cos(k)) * ((1.0 - cos((2.0 * k))) / 2.0))));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := Block[{t$95$1 = N[(2.0 * N[(N[Exp[N[(N[(2.0 * N[Log[l$95$m], $MachinePrecision]), $MachinePrecision] + N[Log[N[Power[k, -4.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 1.7e-151], t$95$1, If[LessEqual[k, 0.000105], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[l$95$m, -2.0], $MachinePrecision] * N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.35e+154], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[l$95$m, -2.0], $MachinePrecision] * N[(N[(t / N[Cos[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 - N[Cos[N[(2.0 * k), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := 2 \cdot \frac{e^{2 \cdot \log l_m + \log \left({k}^{-4}\right)}}{t}\\
\mathbf{if}\;k \leq 1.7 \cdot 10^{-151}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;k \leq 0.000105:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({l_m}^{-2} \cdot \left(t \cdot {k}^{2}\right)\right)}\\

\mathbf{elif}\;k \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({l_m}^{-2} \cdot \left(\frac{t}{\cos k} \cdot \frac{1 - \cos \left(2 \cdot k\right)}{2}\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


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

Alternative 8: 60.2% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := 2 \cdot \log l_m\\ \mathbf{if}\;l_m \cdot l_m \leq 2 \cdot 10^{-45}:\\ \;\;\;\;2 \cdot \frac{e^{t_1 + \log \left({k}^{-4}\right)}}{t}\\ \mathbf{elif}\;l_m \cdot l_m \leq 10^{+255}:\\ \;\;\;\;\frac{2}{\frac{k}{t}} \cdot \left(\cos k \cdot \left(\frac{{l_m}^{2}}{k} \cdot {\left(t \cdot \sin k\right)}^{-2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{e^{t_1 - \log t}}{{k}^{4}}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k)
 :precision binary64
 (let* ((t_1 (* 2.0 (log l_m))))
   (if (<= (* l_m l_m) 2e-45)
     (* 2.0 (/ (exp (+ t_1 (log (pow k -4.0)))) t))
     (if (<= (* l_m l_m) 1e+255)
       (*
        (/ 2.0 (/ k t))
        (* (cos k) (* (/ (pow l_m 2.0) k) (pow (* t (sin k)) -2.0))))
       (* 2.0 (/ (exp (- t_1 (log t))) (pow k 4.0)))))))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	double t_1 = 2.0 * log(l_m);
	double tmp;
	if ((l_m * l_m) <= 2e-45) {
		tmp = 2.0 * (exp((t_1 + log(pow(k, -4.0)))) / t);
	} else if ((l_m * l_m) <= 1e+255) {
		tmp = (2.0 / (k / t)) * (cos(k) * ((pow(l_m, 2.0) / k) * pow((t * sin(k)), -2.0)));
	} else {
		tmp = 2.0 * (exp((t_1 - log(t))) / pow(k, 4.0));
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(t, l_m, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: tmp
    t_1 = 2.0d0 * log(l_m)
    if ((l_m * l_m) <= 2d-45) then
        tmp = 2.0d0 * (exp((t_1 + log((k ** (-4.0d0))))) / t)
    else if ((l_m * l_m) <= 1d+255) then
        tmp = (2.0d0 / (k / t)) * (cos(k) * (((l_m ** 2.0d0) / k) * ((t * sin(k)) ** (-2.0d0))))
    else
        tmp = 2.0d0 * (exp((t_1 - log(t))) / (k ** 4.0d0))
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	double t_1 = 2.0 * Math.log(l_m);
	double tmp;
	if ((l_m * l_m) <= 2e-45) {
		tmp = 2.0 * (Math.exp((t_1 + Math.log(Math.pow(k, -4.0)))) / t);
	} else if ((l_m * l_m) <= 1e+255) {
		tmp = (2.0 / (k / t)) * (Math.cos(k) * ((Math.pow(l_m, 2.0) / k) * Math.pow((t * Math.sin(k)), -2.0)));
	} else {
		tmp = 2.0 * (Math.exp((t_1 - Math.log(t))) / Math.pow(k, 4.0));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(t, l_m, k):
	t_1 = 2.0 * math.log(l_m)
	tmp = 0
	if (l_m * l_m) <= 2e-45:
		tmp = 2.0 * (math.exp((t_1 + math.log(math.pow(k, -4.0)))) / t)
	elif (l_m * l_m) <= 1e+255:
		tmp = (2.0 / (k / t)) * (math.cos(k) * ((math.pow(l_m, 2.0) / k) * math.pow((t * math.sin(k)), -2.0)))
	else:
		tmp = 2.0 * (math.exp((t_1 - math.log(t))) / math.pow(k, 4.0))
	return tmp
l_m = abs(l)
function code(t, l_m, k)
	t_1 = Float64(2.0 * log(l_m))
	tmp = 0.0
	if (Float64(l_m * l_m) <= 2e-45)
		tmp = Float64(2.0 * Float64(exp(Float64(t_1 + log((k ^ -4.0)))) / t));
	elseif (Float64(l_m * l_m) <= 1e+255)
		tmp = Float64(Float64(2.0 / Float64(k / t)) * Float64(cos(k) * Float64(Float64((l_m ^ 2.0) / k) * (Float64(t * sin(k)) ^ -2.0))));
	else
		tmp = Float64(2.0 * Float64(exp(Float64(t_1 - log(t))) / (k ^ 4.0)));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(t, l_m, k)
	t_1 = 2.0 * log(l_m);
	tmp = 0.0;
	if ((l_m * l_m) <= 2e-45)
		tmp = 2.0 * (exp((t_1 + log((k ^ -4.0)))) / t);
	elseif ((l_m * l_m) <= 1e+255)
		tmp = (2.0 / (k / t)) * (cos(k) * (((l_m ^ 2.0) / k) * ((t * sin(k)) ^ -2.0)));
	else
		tmp = 2.0 * (exp((t_1 - log(t))) / (k ^ 4.0));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := Block[{t$95$1 = N[(2.0 * N[Log[l$95$m], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(l$95$m * l$95$m), $MachinePrecision], 2e-45], N[(2.0 * N[(N[Exp[N[(t$95$1 + N[Log[N[Power[k, -4.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l$95$m * l$95$m), $MachinePrecision], 1e+255], N[(N[(2.0 / N[(k / t), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] * N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] / k), $MachinePrecision] * N[Power[N[(t * N[Sin[k], $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Exp[N[(t$95$1 - N[Log[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := 2 \cdot \log l_m\\
\mathbf{if}\;l_m \cdot l_m \leq 2 \cdot 10^{-45}:\\
\;\;\;\;2 \cdot \frac{e^{t_1 + \log \left({k}^{-4}\right)}}{t}\\

\mathbf{elif}\;l_m \cdot l_m \leq 10^{+255}:\\
\;\;\;\;\frac{2}{\frac{k}{t}} \cdot \left(\cos k \cdot \left(\frac{{l_m}^{2}}{k} \cdot {\left(t \cdot \sin k\right)}^{-2}\right)\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{e^{t_1 - \log t}}{{k}^{4}}\\


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

Alternative 9: 66.9% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;t \leq 5.4 \cdot 10^{-95}:\\ \;\;\;\;\frac{2}{{k}^{2}} \cdot \frac{{l_m}^{2}}{{k}^{2} \cdot \frac{t}{\cos k}}\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{+100}:\\ \;\;\;\;\left(l_m \cdot \frac{\frac{2}{\sin k}}{\tan k \cdot \frac{{t}^{3}}{l_m}}\right) \cdot {\left(\frac{k}{t}\right)}^{-2}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{e^{2 \cdot \log l_m - \log t}}{{k}^{4}}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k)
 :precision binary64
 (if (<= t 5.4e-95)
   (* (/ 2.0 (pow k 2.0)) (/ (pow l_m 2.0) (* (pow k 2.0) (/ t (cos k)))))
   (if (<= t 5.4e+100)
     (*
      (* l_m (/ (/ 2.0 (sin k)) (* (tan k) (/ (pow t 3.0) l_m))))
      (pow (/ k t) -2.0))
     (* 2.0 (/ (exp (- (* 2.0 (log l_m)) (log t))) (pow k 4.0))))))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	double tmp;
	if (t <= 5.4e-95) {
		tmp = (2.0 / pow(k, 2.0)) * (pow(l_m, 2.0) / (pow(k, 2.0) * (t / cos(k))));
	} else if (t <= 5.4e+100) {
		tmp = (l_m * ((2.0 / sin(k)) / (tan(k) * (pow(t, 3.0) / l_m)))) * pow((k / t), -2.0);
	} else {
		tmp = 2.0 * (exp(((2.0 * log(l_m)) - log(t))) / pow(k, 4.0));
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(t, l_m, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k
    real(8) :: tmp
    if (t <= 5.4d-95) then
        tmp = (2.0d0 / (k ** 2.0d0)) * ((l_m ** 2.0d0) / ((k ** 2.0d0) * (t / cos(k))))
    else if (t <= 5.4d+100) then
        tmp = (l_m * ((2.0d0 / sin(k)) / (tan(k) * ((t ** 3.0d0) / l_m)))) * ((k / t) ** (-2.0d0))
    else
        tmp = 2.0d0 * (exp(((2.0d0 * log(l_m)) - log(t))) / (k ** 4.0d0))
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	double tmp;
	if (t <= 5.4e-95) {
		tmp = (2.0 / Math.pow(k, 2.0)) * (Math.pow(l_m, 2.0) / (Math.pow(k, 2.0) * (t / Math.cos(k))));
	} else if (t <= 5.4e+100) {
		tmp = (l_m * ((2.0 / Math.sin(k)) / (Math.tan(k) * (Math.pow(t, 3.0) / l_m)))) * Math.pow((k / t), -2.0);
	} else {
		tmp = 2.0 * (Math.exp(((2.0 * Math.log(l_m)) - Math.log(t))) / Math.pow(k, 4.0));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(t, l_m, k):
	tmp = 0
	if t <= 5.4e-95:
		tmp = (2.0 / math.pow(k, 2.0)) * (math.pow(l_m, 2.0) / (math.pow(k, 2.0) * (t / math.cos(k))))
	elif t <= 5.4e+100:
		tmp = (l_m * ((2.0 / math.sin(k)) / (math.tan(k) * (math.pow(t, 3.0) / l_m)))) * math.pow((k / t), -2.0)
	else:
		tmp = 2.0 * (math.exp(((2.0 * math.log(l_m)) - math.log(t))) / math.pow(k, 4.0))
	return tmp
l_m = abs(l)
function code(t, l_m, k)
	tmp = 0.0
	if (t <= 5.4e-95)
		tmp = Float64(Float64(2.0 / (k ^ 2.0)) * Float64((l_m ^ 2.0) / Float64((k ^ 2.0) * Float64(t / cos(k)))));
	elseif (t <= 5.4e+100)
		tmp = Float64(Float64(l_m * Float64(Float64(2.0 / sin(k)) / Float64(tan(k) * Float64((t ^ 3.0) / l_m)))) * (Float64(k / t) ^ -2.0));
	else
		tmp = Float64(2.0 * Float64(exp(Float64(Float64(2.0 * log(l_m)) - log(t))) / (k ^ 4.0)));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(t, l_m, k)
	tmp = 0.0;
	if (t <= 5.4e-95)
		tmp = (2.0 / (k ^ 2.0)) * ((l_m ^ 2.0) / ((k ^ 2.0) * (t / cos(k))));
	elseif (t <= 5.4e+100)
		tmp = (l_m * ((2.0 / sin(k)) / (tan(k) * ((t ^ 3.0) / l_m)))) * ((k / t) ^ -2.0);
	else
		tmp = 2.0 * (exp(((2.0 * log(l_m)) - log(t))) / (k ^ 4.0));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := If[LessEqual[t, 5.4e-95], N[(N[(2.0 / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.4e+100], N[(N[(l$95$m * N[(N[(2.0 / N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[(N[Tan[k], $MachinePrecision] * N[(N[Power[t, 3.0], $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[N[(k / t), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Exp[N[(N[(2.0 * N[Log[l$95$m], $MachinePrecision]), $MachinePrecision] - N[Log[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;t \leq 5.4 \cdot 10^{-95}:\\
\;\;\;\;\frac{2}{{k}^{2}} \cdot \frac{{l_m}^{2}}{{k}^{2} \cdot \frac{t}{\cos k}}\\

\mathbf{elif}\;t \leq 5.4 \cdot 10^{+100}:\\
\;\;\;\;\left(l_m \cdot \frac{\frac{2}{\sin k}}{\tan k \cdot \frac{{t}^{3}}{l_m}}\right) \cdot {\left(\frac{k}{t}\right)}^{-2}\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{e^{2 \cdot \log l_m - \log t}}{{k}^{4}}\\


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

Alternative 10: 68.5% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;k \leq 2.25 \cdot 10^{-151} \lor \neg \left(k \leq 1.3 \cdot 10^{+152}\right):\\ \;\;\;\;2 \cdot \frac{e^{2 \cdot \log l_m + \log \left({k}^{-4}\right)}}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{k}^{2}} \cdot \frac{{l_m}^{2}}{{k}^{2} \cdot \frac{t}{\cos k}}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k)
 :precision binary64
 (if (or (<= k 2.25e-151) (not (<= k 1.3e+152)))
   (* 2.0 (/ (exp (+ (* 2.0 (log l_m)) (log (pow k -4.0)))) t))
   (* (/ 2.0 (pow k 2.0)) (/ (pow l_m 2.0) (* (pow k 2.0) (/ t (cos k)))))))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	double tmp;
	if ((k <= 2.25e-151) || !(k <= 1.3e+152)) {
		tmp = 2.0 * (exp(((2.0 * log(l_m)) + log(pow(k, -4.0)))) / t);
	} else {
		tmp = (2.0 / pow(k, 2.0)) * (pow(l_m, 2.0) / (pow(k, 2.0) * (t / cos(k))));
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(t, l_m, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k
    real(8) :: tmp
    if ((k <= 2.25d-151) .or. (.not. (k <= 1.3d+152))) then
        tmp = 2.0d0 * (exp(((2.0d0 * log(l_m)) + log((k ** (-4.0d0))))) / t)
    else
        tmp = (2.0d0 / (k ** 2.0d0)) * ((l_m ** 2.0d0) / ((k ** 2.0d0) * (t / cos(k))))
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	double tmp;
	if ((k <= 2.25e-151) || !(k <= 1.3e+152)) {
		tmp = 2.0 * (Math.exp(((2.0 * Math.log(l_m)) + Math.log(Math.pow(k, -4.0)))) / t);
	} else {
		tmp = (2.0 / Math.pow(k, 2.0)) * (Math.pow(l_m, 2.0) / (Math.pow(k, 2.0) * (t / Math.cos(k))));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(t, l_m, k):
	tmp = 0
	if (k <= 2.25e-151) or not (k <= 1.3e+152):
		tmp = 2.0 * (math.exp(((2.0 * math.log(l_m)) + math.log(math.pow(k, -4.0)))) / t)
	else:
		tmp = (2.0 / math.pow(k, 2.0)) * (math.pow(l_m, 2.0) / (math.pow(k, 2.0) * (t / math.cos(k))))
	return tmp
l_m = abs(l)
function code(t, l_m, k)
	tmp = 0.0
	if ((k <= 2.25e-151) || !(k <= 1.3e+152))
		tmp = Float64(2.0 * Float64(exp(Float64(Float64(2.0 * log(l_m)) + log((k ^ -4.0)))) / t));
	else
		tmp = Float64(Float64(2.0 / (k ^ 2.0)) * Float64((l_m ^ 2.0) / Float64((k ^ 2.0) * Float64(t / cos(k)))));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(t, l_m, k)
	tmp = 0.0;
	if ((k <= 2.25e-151) || ~((k <= 1.3e+152)))
		tmp = 2.0 * (exp(((2.0 * log(l_m)) + log((k ^ -4.0)))) / t);
	else
		tmp = (2.0 / (k ^ 2.0)) * ((l_m ^ 2.0) / ((k ^ 2.0) * (t / cos(k))));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := If[Or[LessEqual[k, 2.25e-151], N[Not[LessEqual[k, 1.3e+152]], $MachinePrecision]], N[(2.0 * N[(N[Exp[N[(N[(2.0 * N[Log[l$95$m], $MachinePrecision]), $MachinePrecision] + N[Log[N[Power[k, -4.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.25 \cdot 10^{-151} \lor \neg \left(k \leq 1.3 \cdot 10^{+152}\right):\\
\;\;\;\;2 \cdot \frac{e^{2 \cdot \log l_m + \log \left({k}^{-4}\right)}}{t}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{{k}^{2}} \cdot \frac{{l_m}^{2}}{{k}^{2} \cdot \frac{t}{\cos k}}\\


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

Alternative 11: 68.4% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;k \leq 6.8 \cdot 10^{-152} \lor \neg \left(k \leq 5.6 \cdot 10^{+153}\right):\\ \;\;\;\;2 \cdot \frac{e^{2 \cdot \log l_m + \log \left({k}^{-4}\right)}}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{k}^{2} \cdot \left({l_m}^{-2} \cdot \left({k}^{2} \cdot \frac{t}{\cos k}\right)\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k)
 :precision binary64
 (if (or (<= k 6.8e-152) (not (<= k 5.6e+153)))
   (* 2.0 (/ (exp (+ (* 2.0 (log l_m)) (log (pow k -4.0)))) t))
   (/ 2.0 (* (pow k 2.0) (* (pow l_m -2.0) (* (pow k 2.0) (/ t (cos k))))))))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	double tmp;
	if ((k <= 6.8e-152) || !(k <= 5.6e+153)) {
		tmp = 2.0 * (exp(((2.0 * log(l_m)) + log(pow(k, -4.0)))) / t);
	} else {
		tmp = 2.0 / (pow(k, 2.0) * (pow(l_m, -2.0) * (pow(k, 2.0) * (t / cos(k)))));
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(t, l_m, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k
    real(8) :: tmp
    if ((k <= 6.8d-152) .or. (.not. (k <= 5.6d+153))) then
        tmp = 2.0d0 * (exp(((2.0d0 * log(l_m)) + log((k ** (-4.0d0))))) / t)
    else
        tmp = 2.0d0 / ((k ** 2.0d0) * ((l_m ** (-2.0d0)) * ((k ** 2.0d0) * (t / cos(k)))))
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	double tmp;
	if ((k <= 6.8e-152) || !(k <= 5.6e+153)) {
		tmp = 2.0 * (Math.exp(((2.0 * Math.log(l_m)) + Math.log(Math.pow(k, -4.0)))) / t);
	} else {
		tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(l_m, -2.0) * (Math.pow(k, 2.0) * (t / Math.cos(k)))));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(t, l_m, k):
	tmp = 0
	if (k <= 6.8e-152) or not (k <= 5.6e+153):
		tmp = 2.0 * (math.exp(((2.0 * math.log(l_m)) + math.log(math.pow(k, -4.0)))) / t)
	else:
		tmp = 2.0 / (math.pow(k, 2.0) * (math.pow(l_m, -2.0) * (math.pow(k, 2.0) * (t / math.cos(k)))))
	return tmp
l_m = abs(l)
function code(t, l_m, k)
	tmp = 0.0
	if ((k <= 6.8e-152) || !(k <= 5.6e+153))
		tmp = Float64(2.0 * Float64(exp(Float64(Float64(2.0 * log(l_m)) + log((k ^ -4.0)))) / t));
	else
		tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((l_m ^ -2.0) * Float64((k ^ 2.0) * Float64(t / cos(k))))));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(t, l_m, k)
	tmp = 0.0;
	if ((k <= 6.8e-152) || ~((k <= 5.6e+153)))
		tmp = 2.0 * (exp(((2.0 * log(l_m)) + log((k ^ -4.0)))) / t);
	else
		tmp = 2.0 / ((k ^ 2.0) * ((l_m ^ -2.0) * ((k ^ 2.0) * (t / cos(k)))));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := If[Or[LessEqual[k, 6.8e-152], N[Not[LessEqual[k, 5.6e+153]], $MachinePrecision]], N[(2.0 * N[(N[Exp[N[(N[(2.0 * N[Log[l$95$m], $MachinePrecision]), $MachinePrecision] + N[Log[N[Power[k, -4.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[l$95$m, -2.0], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] * N[(t / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;k \leq 6.8 \cdot 10^{-152} \lor \neg \left(k \leq 5.6 \cdot 10^{+153}\right):\\
\;\;\;\;2 \cdot \frac{e^{2 \cdot \log l_m + \log \left({k}^{-4}\right)}}{t}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({l_m}^{-2} \cdot \left({k}^{2} \cdot \frac{t}{\cos k}\right)\right)}\\


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

Alternative 12: 66.8% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;k \leq 1.38 \cdot 10^{-151} \lor \neg \left(k \leq 9.8 \cdot 10^{+79}\right):\\ \;\;\;\;2 \cdot \frac{e^{2 \cdot \log l_m + \log \left({k}^{-4}\right)}}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{k}^{2} \cdot \left({l_m}^{-2} \cdot \left(t \cdot {k}^{2}\right)\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k)
 :precision binary64
 (if (or (<= k 1.38e-151) (not (<= k 9.8e+79)))
   (* 2.0 (/ (exp (+ (* 2.0 (log l_m)) (log (pow k -4.0)))) t))
   (/ 2.0 (* (pow k 2.0) (* (pow l_m -2.0) (* t (pow k 2.0)))))))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	double tmp;
	if ((k <= 1.38e-151) || !(k <= 9.8e+79)) {
		tmp = 2.0 * (exp(((2.0 * log(l_m)) + log(pow(k, -4.0)))) / t);
	} else {
		tmp = 2.0 / (pow(k, 2.0) * (pow(l_m, -2.0) * (t * pow(k, 2.0))));
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(t, l_m, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k
    real(8) :: tmp
    if ((k <= 1.38d-151) .or. (.not. (k <= 9.8d+79))) then
        tmp = 2.0d0 * (exp(((2.0d0 * log(l_m)) + log((k ** (-4.0d0))))) / t)
    else
        tmp = 2.0d0 / ((k ** 2.0d0) * ((l_m ** (-2.0d0)) * (t * (k ** 2.0d0))))
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	double tmp;
	if ((k <= 1.38e-151) || !(k <= 9.8e+79)) {
		tmp = 2.0 * (Math.exp(((2.0 * Math.log(l_m)) + Math.log(Math.pow(k, -4.0)))) / t);
	} else {
		tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(l_m, -2.0) * (t * Math.pow(k, 2.0))));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(t, l_m, k):
	tmp = 0
	if (k <= 1.38e-151) or not (k <= 9.8e+79):
		tmp = 2.0 * (math.exp(((2.0 * math.log(l_m)) + math.log(math.pow(k, -4.0)))) / t)
	else:
		tmp = 2.0 / (math.pow(k, 2.0) * (math.pow(l_m, -2.0) * (t * math.pow(k, 2.0))))
	return tmp
l_m = abs(l)
function code(t, l_m, k)
	tmp = 0.0
	if ((k <= 1.38e-151) || !(k <= 9.8e+79))
		tmp = Float64(2.0 * Float64(exp(Float64(Float64(2.0 * log(l_m)) + log((k ^ -4.0)))) / t));
	else
		tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((l_m ^ -2.0) * Float64(t * (k ^ 2.0)))));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(t, l_m, k)
	tmp = 0.0;
	if ((k <= 1.38e-151) || ~((k <= 9.8e+79)))
		tmp = 2.0 * (exp(((2.0 * log(l_m)) + log((k ^ -4.0)))) / t);
	else
		tmp = 2.0 / ((k ^ 2.0) * ((l_m ^ -2.0) * (t * (k ^ 2.0))));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := If[Or[LessEqual[k, 1.38e-151], N[Not[LessEqual[k, 9.8e+79]], $MachinePrecision]], N[(2.0 * N[(N[Exp[N[(N[(2.0 * N[Log[l$95$m], $MachinePrecision]), $MachinePrecision] + N[Log[N[Power[k, -4.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[l$95$m, -2.0], $MachinePrecision] * N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.38 \cdot 10^{-151} \lor \neg \left(k \leq 9.8 \cdot 10^{+79}\right):\\
\;\;\;\;2 \cdot \frac{e^{2 \cdot \log l_m + \log \left({k}^{-4}\right)}}{t}\\

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


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

Alternative 13: 55.6% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := 2 \cdot \log l_m\\ \mathbf{if}\;k \leq 1.15 \cdot 10^{-96}:\\ \;\;\;\;2 \cdot \frac{e^{t_1 + \log \left({k}^{-4}\right)}}{t}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{e^{t_1 - \log t}}{{k}^{4}}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k)
 :precision binary64
 (let* ((t_1 (* 2.0 (log l_m))))
   (if (<= k 1.15e-96)
     (* 2.0 (/ (exp (+ t_1 (log (pow k -4.0)))) t))
     (* 2.0 (/ (exp (- t_1 (log t))) (pow k 4.0))))))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	double t_1 = 2.0 * log(l_m);
	double tmp;
	if (k <= 1.15e-96) {
		tmp = 2.0 * (exp((t_1 + log(pow(k, -4.0)))) / t);
	} else {
		tmp = 2.0 * (exp((t_1 - log(t))) / pow(k, 4.0));
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(t, l_m, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: tmp
    t_1 = 2.0d0 * log(l_m)
    if (k <= 1.15d-96) then
        tmp = 2.0d0 * (exp((t_1 + log((k ** (-4.0d0))))) / t)
    else
        tmp = 2.0d0 * (exp((t_1 - log(t))) / (k ** 4.0d0))
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	double t_1 = 2.0 * Math.log(l_m);
	double tmp;
	if (k <= 1.15e-96) {
		tmp = 2.0 * (Math.exp((t_1 + Math.log(Math.pow(k, -4.0)))) / t);
	} else {
		tmp = 2.0 * (Math.exp((t_1 - Math.log(t))) / Math.pow(k, 4.0));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(t, l_m, k):
	t_1 = 2.0 * math.log(l_m)
	tmp = 0
	if k <= 1.15e-96:
		tmp = 2.0 * (math.exp((t_1 + math.log(math.pow(k, -4.0)))) / t)
	else:
		tmp = 2.0 * (math.exp((t_1 - math.log(t))) / math.pow(k, 4.0))
	return tmp
l_m = abs(l)
function code(t, l_m, k)
	t_1 = Float64(2.0 * log(l_m))
	tmp = 0.0
	if (k <= 1.15e-96)
		tmp = Float64(2.0 * Float64(exp(Float64(t_1 + log((k ^ -4.0)))) / t));
	else
		tmp = Float64(2.0 * Float64(exp(Float64(t_1 - log(t))) / (k ^ 4.0)));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(t, l_m, k)
	t_1 = 2.0 * log(l_m);
	tmp = 0.0;
	if (k <= 1.15e-96)
		tmp = 2.0 * (exp((t_1 + log((k ^ -4.0)))) / t);
	else
		tmp = 2.0 * (exp((t_1 - log(t))) / (k ^ 4.0));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := Block[{t$95$1 = N[(2.0 * N[Log[l$95$m], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 1.15e-96], N[(2.0 * N[(N[Exp[N[(t$95$1 + N[Log[N[Power[k, -4.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Exp[N[(t$95$1 - N[Log[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := 2 \cdot \log l_m\\
\mathbf{if}\;k \leq 1.15 \cdot 10^{-96}:\\
\;\;\;\;2 \cdot \frac{e^{t_1 + \log \left({k}^{-4}\right)}}{t}\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{e^{t_1 - \log t}}{{k}^{4}}\\


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

Alternative 14: 63.3% accurate, 1.3× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;k \leq 5.6 \cdot 10^{+88}:\\ \;\;\;\;\frac{2}{{k}^{2}} \cdot \frac{{l_m}^{2}}{t \cdot {k}^{2}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{0}{t}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k)
 :precision binary64
 (if (<= k 5.6e+88)
   (* (/ 2.0 (pow k 2.0)) (/ (pow l_m 2.0) (* t (pow k 2.0))))
   (* 2.0 (/ 0.0 t))))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	double tmp;
	if (k <= 5.6e+88) {
		tmp = (2.0 / pow(k, 2.0)) * (pow(l_m, 2.0) / (t * pow(k, 2.0)));
	} else {
		tmp = 2.0 * (0.0 / t);
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(t, l_m, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k
    real(8) :: tmp
    if (k <= 5.6d+88) then
        tmp = (2.0d0 / (k ** 2.0d0)) * ((l_m ** 2.0d0) / (t * (k ** 2.0d0)))
    else
        tmp = 2.0d0 * (0.0d0 / t)
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	double tmp;
	if (k <= 5.6e+88) {
		tmp = (2.0 / Math.pow(k, 2.0)) * (Math.pow(l_m, 2.0) / (t * Math.pow(k, 2.0)));
	} else {
		tmp = 2.0 * (0.0 / t);
	}
	return tmp;
}
l_m = math.fabs(l)
def code(t, l_m, k):
	tmp = 0
	if k <= 5.6e+88:
		tmp = (2.0 / math.pow(k, 2.0)) * (math.pow(l_m, 2.0) / (t * math.pow(k, 2.0)))
	else:
		tmp = 2.0 * (0.0 / t)
	return tmp
l_m = abs(l)
function code(t, l_m, k)
	tmp = 0.0
	if (k <= 5.6e+88)
		tmp = Float64(Float64(2.0 / (k ^ 2.0)) * Float64((l_m ^ 2.0) / Float64(t * (k ^ 2.0))));
	else
		tmp = Float64(2.0 * Float64(0.0 / t));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(t, l_m, k)
	tmp = 0.0;
	if (k <= 5.6e+88)
		tmp = (2.0 / (k ^ 2.0)) * ((l_m ^ 2.0) / (t * (k ^ 2.0)));
	else
		tmp = 2.0 * (0.0 / t);
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := If[LessEqual[k, 5.6e+88], N[(N[(2.0 / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(0.0 / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;k \leq 5.6 \cdot 10^{+88}:\\
\;\;\;\;\frac{2}{{k}^{2}} \cdot \frac{{l_m}^{2}}{t \cdot {k}^{2}}\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{0}{t}\\


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

Alternative 15: 63.1% accurate, 1.3× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;k \leq 5.6 \cdot 10^{+88}:\\ \;\;\;\;\frac{2}{{k}^{2} \cdot \left({l_m}^{-2} \cdot \left(t \cdot {k}^{2}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{0}{t}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k)
 :precision binary64
 (if (<= k 5.6e+88)
   (/ 2.0 (* (pow k 2.0) (* (pow l_m -2.0) (* t (pow k 2.0)))))
   (* 2.0 (/ 0.0 t))))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	double tmp;
	if (k <= 5.6e+88) {
		tmp = 2.0 / (pow(k, 2.0) * (pow(l_m, -2.0) * (t * pow(k, 2.0))));
	} else {
		tmp = 2.0 * (0.0 / t);
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(t, l_m, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k
    real(8) :: tmp
    if (k <= 5.6d+88) then
        tmp = 2.0d0 / ((k ** 2.0d0) * ((l_m ** (-2.0d0)) * (t * (k ** 2.0d0))))
    else
        tmp = 2.0d0 * (0.0d0 / t)
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	double tmp;
	if (k <= 5.6e+88) {
		tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(l_m, -2.0) * (t * Math.pow(k, 2.0))));
	} else {
		tmp = 2.0 * (0.0 / t);
	}
	return tmp;
}
l_m = math.fabs(l)
def code(t, l_m, k):
	tmp = 0
	if k <= 5.6e+88:
		tmp = 2.0 / (math.pow(k, 2.0) * (math.pow(l_m, -2.0) * (t * math.pow(k, 2.0))))
	else:
		tmp = 2.0 * (0.0 / t)
	return tmp
l_m = abs(l)
function code(t, l_m, k)
	tmp = 0.0
	if (k <= 5.6e+88)
		tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((l_m ^ -2.0) * Float64(t * (k ^ 2.0)))));
	else
		tmp = Float64(2.0 * Float64(0.0 / t));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(t, l_m, k)
	tmp = 0.0;
	if (k <= 5.6e+88)
		tmp = 2.0 / ((k ^ 2.0) * ((l_m ^ -2.0) * (t * (k ^ 2.0))));
	else
		tmp = 2.0 * (0.0 / t);
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := If[LessEqual[k, 5.6e+88], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[l$95$m, -2.0], $MachinePrecision] * N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(0.0 / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;k \leq 5.6 \cdot 10^{+88}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({l_m}^{-2} \cdot \left(t \cdot {k}^{2}\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{0}{t}\\


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

Alternative 16: 60.1% accurate, 2.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;k \leq 5 \cdot 10^{+73}:\\ \;\;\;\;2 \cdot \frac{\frac{{l_m}^{2}}{t}}{{k}^{4}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{0}{t}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k)
 :precision binary64
 (if (<= k 5e+73)
   (* 2.0 (/ (/ (pow l_m 2.0) t) (pow k 4.0)))
   (* 2.0 (/ 0.0 t))))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	double tmp;
	if (k <= 5e+73) {
		tmp = 2.0 * ((pow(l_m, 2.0) / t) / pow(k, 4.0));
	} else {
		tmp = 2.0 * (0.0 / t);
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(t, l_m, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k
    real(8) :: tmp
    if (k <= 5d+73) then
        tmp = 2.0d0 * (((l_m ** 2.0d0) / t) / (k ** 4.0d0))
    else
        tmp = 2.0d0 * (0.0d0 / t)
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	double tmp;
	if (k <= 5e+73) {
		tmp = 2.0 * ((Math.pow(l_m, 2.0) / t) / Math.pow(k, 4.0));
	} else {
		tmp = 2.0 * (0.0 / t);
	}
	return tmp;
}
l_m = math.fabs(l)
def code(t, l_m, k):
	tmp = 0
	if k <= 5e+73:
		tmp = 2.0 * ((math.pow(l_m, 2.0) / t) / math.pow(k, 4.0))
	else:
		tmp = 2.0 * (0.0 / t)
	return tmp
l_m = abs(l)
function code(t, l_m, k)
	tmp = 0.0
	if (k <= 5e+73)
		tmp = Float64(2.0 * Float64(Float64((l_m ^ 2.0) / t) / (k ^ 4.0)));
	else
		tmp = Float64(2.0 * Float64(0.0 / t));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(t, l_m, k)
	tmp = 0.0;
	if (k <= 5e+73)
		tmp = 2.0 * (((l_m ^ 2.0) / t) / (k ^ 4.0));
	else
		tmp = 2.0 * (0.0 / t);
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := If[LessEqual[k, 5e+73], N[(2.0 * N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] / t), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(0.0 / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;k \leq 5 \cdot 10^{+73}:\\
\;\;\;\;2 \cdot \frac{\frac{{l_m}^{2}}{t}}{{k}^{4}}\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{0}{t}\\


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

Alternative 17: 31.6% accurate, 84.2× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ 2 \cdot \frac{0}{t} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k) :precision binary64 (* 2.0 (/ 0.0 t)))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	return 2.0 * (0.0 / t);
}
l_m = abs(l)
real(8) function code(t, l_m, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k
    code = 2.0d0 * (0.0d0 / t)
end function
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	return 2.0 * (0.0 / t);
}
l_m = math.fabs(l)
def code(t, l_m, k):
	return 2.0 * (0.0 / t)
l_m = abs(l)
function code(t, l_m, k)
	return Float64(2.0 * Float64(0.0 / t))
end
l_m = abs(l);
function tmp = code(t, l_m, k)
	tmp = 2.0 * (0.0 / t);
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := N[(2.0 * N[(0.0 / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|

\\
2 \cdot \frac{0}{t}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Reproduce

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