\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}
\mathbf{if}\;t \leq -1.493328393148849 \cdot 10^{+117}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{-t \cdot \sqrt{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}}\\
\mathbf{elif}\;t \leq -1.0501925897887986 \cdot 10^{-125}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(\frac{\ell}{\frac{x}{\ell}} + t \cdot t\right) + 4 \cdot \frac{t \cdot t}{x}}}\\
\mathbf{elif}\;t \leq -8.423808617895155 \cdot 10^{-250}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{-t \cdot \sqrt{2 + \frac{4}{x}}}\\
\mathbf{elif}\;t \leq 124.71595513294787:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(\frac{\ell}{\frac{x}{\ell}} + t \cdot t\right) + 4 \cdot \frac{t \cdot t}{x}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot \sqrt{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
(if (<= t -1.493328393148849e+117)
(/
(* t (sqrt 2.0))
(- (* t (sqrt (+ (/ 2.0 (- x 1.0)) (* 2.0 (/ x (- x 1.0))))))))
(if (<= t -1.0501925897887986e-125)
(/
(* t (sqrt 2.0))
(sqrt (+ (* 2.0 (+ (/ l (/ x l)) (* t t))) (* 4.0 (/ (* t t) x)))))
(if (<= t -8.423808617895155e-250)
(/ (* t (sqrt 2.0)) (- (* t (sqrt (+ 2.0 (/ 4.0 x))))))
(if (<= t 124.71595513294787)
(/
(* t (sqrt 2.0))
(sqrt (+ (* 2.0 (+ (/ l (/ x l)) (* t t))) (* 4.0 (/ (* t t) x)))))
(/
(* t (sqrt 2.0))
(* 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 tmp;
if (t <= -1.493328393148849e+117) {
tmp = (t * sqrt(2.0)) / -(t * sqrt((2.0 / (x - 1.0)) + (2.0 * (x / (x - 1.0)))));
} else if (t <= -1.0501925897887986e-125) {
tmp = (t * sqrt(2.0)) / sqrt((2.0 * ((l / (x / l)) + (t * t))) + (4.0 * ((t * t) / x)));
} else if (t <= -8.423808617895155e-250) {
tmp = (t * sqrt(2.0)) / -(t * sqrt(2.0 + (4.0 / x)));
} else if (t <= 124.71595513294787) {
tmp = (t * sqrt(2.0)) / sqrt((2.0 * ((l / (x / l)) + (t * t))) + (4.0 * ((t * t) / x)));
} else {
tmp = (t * sqrt(2.0)) / (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
Results
if t < -1.49332839314884911e117Initial program 54.6
Taylor expanded around -inf 2.5
Simplified2.5
if -1.49332839314884911e117 < t < -1.05019258978879857e-125 or -8.42380861789515478e-250 < t < 124.71595513294787Initial program 37.1
Taylor expanded around inf 16.6
Simplified16.6
rmApplied add-cube-cbrt_binary64_11316.7
Applied times-frac_binary64_8413.2
rmApplied associate-+r+_binary64_1013.2
Simplified13.2
if -1.05019258978879857e-125 < t < -8.42380861789515478e-250Initial program 54.4
Taylor expanded around inf 26.5
Simplified26.5
Taylor expanded around -inf 31.7
Simplified31.7
if 124.71595513294787 < t Initial program 41.5
Taylor expanded around inf 4.4
Simplified4.4
Final simplification10.2
herbie shell --seed 2021007
(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)))))