(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 (sqrt (+ (/ 2.0 (+ x -1.0)) (* 2.0 (/ x (+ x -1.0)))))))
(if (<= t -8.5e+115)
(/ t_1 (* t_2 (- t)))
(if (<= t 6.5e+119)
(/
t_1
(fabs
(sqrt
(fma
4.0
(pow (/ t x) 2.0)
(fma
4.0
(/ t (/ x t))
(fma 2.0 (pow (/ l x) 2.0) (* 2.0 (fma t t (/ l (/ x l))))))))))
(/ t_1 (* t 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 = sqrt(((2.0 / (x + -1.0)) + (2.0 * (x / (x + -1.0)))));
double tmp;
if (t <= -8.5e+115) {
tmp = t_1 / (t_2 * -t);
} else if (t <= 6.5e+119) {
tmp = t_1 / fabs(sqrt(fma(4.0, pow((t / x), 2.0), fma(4.0, (t / (x / t)), fma(2.0, pow((l / x), 2.0), (2.0 * fma(t, t, (l / (x / l)))))))));
} else {
tmp = t_1 / (t * 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 = sqrt(Float64(Float64(2.0 / Float64(x + -1.0)) + Float64(2.0 * Float64(x / Float64(x + -1.0))))) tmp = 0.0 if (t <= -8.5e+115) tmp = Float64(t_1 / Float64(t_2 * Float64(-t))); elseif (t <= 6.5e+119) tmp = Float64(t_1 / abs(sqrt(fma(4.0, (Float64(t / x) ^ 2.0), fma(4.0, Float64(t / Float64(x / t)), fma(2.0, (Float64(l / x) ^ 2.0), Float64(2.0 * fma(t, t, Float64(l / Float64(x / l)))))))))); else tmp = Float64(t_1 / Float64(t * 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[Sqrt[N[(N[(2.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(x / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -8.5e+115], N[(t$95$1 / N[(t$95$2 * (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.5e+119], N[(t$95$1 / N[Abs[N[Sqrt[N[(4.0 * N[Power[N[(t / x), $MachinePrecision], 2.0], $MachinePrecision] + N[(4.0 * N[(t / N[(x / t), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[Power[N[(l / x), $MachinePrecision], 2.0], $MachinePrecision] + N[(2.0 * N[(t * t + N[(l / N[(x / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(t * t$95$2), $MachinePrecision]), $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 := \sqrt{\frac{2}{x + -1} + 2 \cdot \frac{x}{x + -1}}\\
\mathbf{if}\;t \leq -8.5 \cdot 10^{+115}:\\
\;\;\;\;\frac{t_1}{t_2 \cdot \left(-t\right)}\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{+119}:\\
\;\;\;\;\frac{t_1}{\left|\sqrt{\mathsf{fma}\left(4, {\left(\frac{t}{x}\right)}^{2}, \mathsf{fma}\left(4, \frac{t}{\frac{x}{t}}, \mathsf{fma}\left(2, {\left(\frac{\ell}{x}\right)}^{2}, 2 \cdot \mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right)\right)\right)\right)}\right|}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{t \cdot t_2}\\
\end{array}



Bits error versus x



Bits error versus l



Bits error versus t
if t < -8.50000000000000057e115Initial program 53.3
Simplified53.3
Taylor expanded in t around -inf 2.4
Simplified2.4
if -8.50000000000000057e115 < t < 6.4999999999999997e119Initial program 37.5
Simplified37.5
Taylor expanded in x around inf 19.2
Simplified19.2
Applied egg-rr12.7
if 6.4999999999999997e119 < t Initial program 52.5
Simplified52.5
Taylor expanded in t around inf 2.1
Simplified2.1
Final simplification8.8
herbie shell --seed 2022162
(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)))))