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



Bits error versus x



Bits error versus l



Bits error versus t
if l < 8.85822011000070548e168 or 3.3598491021846746e245 < l Initial program 41.6
Taylor expanded in x around inf 30.6
Simplified30.6
Taylor expanded in x around inf 37.6
Simplified35.6
Applied egg-rr11.8
if 8.85822011000070548e168 < l < 3.3598491021846746e245Initial program 64.0
Taylor expanded in x around inf 57.2
Simplified57.2
Taylor expanded in l around inf 25.4
Simplified25.4
Final simplification12.5
herbie shell --seed 2022150
(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)))))