(FPCore (x l t) :precision binary64 (/ (* (sqrt 2.0) t) (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* t (sqrt 2.0))) (t_2 (* t_1 (sqrt (/ (+ 1.0 x) (+ x -1.0))))))
(if (<= l -3.5e+181)
(/ (+ (exp (log1p t_1)) -1.0) t_2)
(/ (fabs t_1) t_2))))double code(double x, double l, double t) {
return (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
double code(double x, double l, double t) {
double t_1 = t * sqrt(2.0);
double t_2 = t_1 * sqrt(((1.0 + x) / (x + -1.0)));
double tmp;
if (l <= -3.5e+181) {
tmp = (exp(log1p(t_1)) + -1.0) / t_2;
} else {
tmp = fabs(t_1) / t_2;
}
return tmp;
}
public static double code(double x, double l, double t) {
return (Math.sqrt(2.0) * t) / Math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
public static double code(double x, double l, double t) {
double t_1 = t * Math.sqrt(2.0);
double t_2 = t_1 * Math.sqrt(((1.0 + x) / (x + -1.0)));
double tmp;
if (l <= -3.5e+181) {
tmp = (Math.exp(Math.log1p(t_1)) + -1.0) / t_2;
} else {
tmp = Math.abs(t_1) / t_2;
}
return tmp;
}
def code(x, l, t): return (math.sqrt(2.0) * t) / math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)))
def code(x, l, t): t_1 = t * math.sqrt(2.0) t_2 = t_1 * math.sqrt(((1.0 + x) / (x + -1.0))) tmp = 0 if l <= -3.5e+181: tmp = (math.exp(math.log1p(t_1)) + -1.0) / t_2 else: tmp = math.fabs(t_1) / t_2 return tmp
function code(x, l, t) return Float64(Float64(sqrt(2.0) * t) / sqrt(Float64(Float64(Float64(Float64(x + 1.0) / Float64(x - 1.0)) * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l)))) end
function code(x, l, t) t_1 = Float64(t * sqrt(2.0)) t_2 = Float64(t_1 * sqrt(Float64(Float64(1.0 + x) / Float64(x + -1.0)))) tmp = 0.0 if (l <= -3.5e+181) tmp = Float64(Float64(exp(log1p(t_1)) + -1.0) / t_2); else tmp = Float64(abs(t_1) / t_2); end return tmp end
code[x_, l_, t_] := N[(N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision] / N[Sqrt[N[(N[(N[(N[(x + 1.0), $MachinePrecision] / N[(x - 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
code[x_, l_, t_] := Block[{t$95$1 = N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[Sqrt[N[(N[(1.0 + x), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -3.5e+181], N[(N[(N[Exp[N[Log[1 + t$95$1], $MachinePrecision]], $MachinePrecision] + -1.0), $MachinePrecision] / t$95$2), $MachinePrecision], N[(N[Abs[t$95$1], $MachinePrecision] / t$95$2), $MachinePrecision]]]]
\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}
\begin{array}{l}
t_1 := t \cdot \sqrt{2}\\
t_2 := t_1 \cdot \sqrt{\frac{1 + x}{x + -1}}\\
\mathbf{if}\;\ell \leq -3.5 \cdot 10^{+181}:\\
\;\;\;\;\frac{e^{\mathsf{log1p}\left(t_1\right)} + -1}{t_2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left|t_1\right|}{t_2}\\
\end{array}



Bits error versus x



Bits error versus l



Bits error versus t
Results
if l < -3.50000000000000008e181Initial program 64.0
Simplified64.0
Taylor expanded in t around inf 51.3
Applied egg-rr37.9
if -3.50000000000000008e181 < l Initial program 41.1
Simplified41.1
Taylor expanded in t around inf 37.8
Applied egg-rr35.1
Applied egg-rr36.8
Applied egg-rr12.9
Final simplification14.7
herbie shell --seed 2022170
(FPCore (x l t)
:name "Toniolo and Linder, Equation (7)"
:precision binary64
(/ (* (sqrt 2.0) t) (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))