\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 := \sqrt{2} \cdot x\\
t_2 := t \cdot \sqrt{2}\\
t_3 := \frac{t_2}{{\left({\left(\mathsf{fma}\left(4, {\left(\frac{t}{x}\right)}^{2}, \mathsf{fma}\left(4, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, {\left(\frac{\ell}{x}\right)}^{2}, 2 \cdot \mathsf{fma}\left(t, t, \ell \cdot \frac{\ell}{x}\right)\right)\right)\right)\right)}^{0.25}\right)}^{2}}\\
\mathbf{if}\;t \leq -8.979527677928165 \cdot 10^{+51}:\\
\;\;\;\;\frac{t_2}{-t \cdot \sqrt{2 + \left(\frac{4}{x} + \frac{4}{x \cdot x}\right)}}\\
\mathbf{elif}\;t \leq 3.0571751654539254 \cdot 10^{-298}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 3.0381553065904004 \cdot 10^{-181}:\\
\;\;\;\;\frac{t_2}{\mathsf{fma}\left(t, \sqrt{2}, \mathsf{fma}\left(2, \frac{t}{t_1}, \frac{\ell \cdot \ell}{t \cdot t_1}\right)\right)}\\
\mathbf{elif}\;t \leq 1.041564456713424 \cdot 10^{+103}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;\frac{t_2}{t \cdot \sqrt{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}}\\
\end{array}
(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 (* (sqrt 2.0) x))
(t_2 (* t (sqrt 2.0)))
(t_3
(/
t_2
(pow
(pow
(fma
4.0
(pow (/ t x) 2.0)
(fma
4.0
(/ (* t t) x)
(fma 2.0 (pow (/ l x) 2.0) (* 2.0 (fma t t (* l (/ l x)))))))
0.25)
2.0))))
(if (<= t -8.979527677928165e+51)
(/ t_2 (- (* t (sqrt (+ 2.0 (+ (/ 4.0 x) (/ 4.0 (* x x))))))))
(if (<= t 3.0571751654539254e-298)
t_3
(if (<= t 3.0381553065904004e-181)
(/ t_2 (fma t (sqrt 2.0) (fma 2.0 (/ t t_1) (/ (* l l) (* t t_1)))))
(if (<= t 1.041564456713424e+103)
t_3
(/
t_2
(* t (sqrt (+ (/ 2.0 (- x 1.0)) (* 2.0 (/ x (- x 1.0)))))))))))))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 = sqrt(2.0) * x;
double t_2 = t * sqrt(2.0);
double t_3 = t_2 / pow(pow(fma(4.0, pow((t / x), 2.0), fma(4.0, ((t * t) / x), fma(2.0, pow((l / x), 2.0), (2.0 * fma(t, t, (l * (l / x))))))), 0.25), 2.0);
double tmp;
if (t <= -8.979527677928165e+51) {
tmp = t_2 / -(t * sqrt((2.0 + ((4.0 / x) + (4.0 / (x * x))))));
} else if (t <= 3.0571751654539254e-298) {
tmp = t_3;
} else if (t <= 3.0381553065904004e-181) {
tmp = t_2 / fma(t, sqrt(2.0), fma(2.0, (t / t_1), ((l * l) / (t * t_1))));
} else if (t <= 1.041564456713424e+103) {
tmp = t_3;
} else {
tmp = t_2 / (t * sqrt(((2.0 / (x - 1.0)) + (2.0 * (x / (x - 1.0))))));
}
return tmp;
}



Bits error versus x



Bits error versus l



Bits error versus t
if t < -8.9795276779281651e51Initial program 44.2
Simplified44.2
Taylor expanded in x around inf 42.9
Simplified42.9
Taylor expanded in t around -inf 3.4
Simplified3.4
if -8.9795276779281651e51 < t < 3.05717516545392536e-298 or 3.0381553065904004e-181 < t < 1.0415644567134239e103Initial program 36.5
Simplified36.5
Taylor expanded in x around inf 17.7
Simplified17.7
Applied egg-rr16.3
Applied egg-rr11.4
if 3.05717516545392536e-298 < t < 3.0381553065904004e-181Initial program 63.3
Simplified63.3
Taylor expanded in x around inf 26.3
Simplified26.3
if 1.0415644567134239e103 < t Initial program 51.1
Simplified51.1
Taylor expanded in t around inf 2.4
Simplified2.4
Final simplification8.8
herbie shell --seed 2022130
(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)))))