(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 (sqrt (+ (/ 2.0 (- x 1.0)) (* 2.0 (/ x (- x 1.0))))))))
(if (<= t -2.440545615200047e+79)
(/ t_1 (- t_2))
(if (<= t 4.084731895194233e+69)
(/
t_1
(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))
(/ 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 * sqrt(((2.0 / (x - 1.0)) + (2.0 * (x / (x - 1.0)))));
double tmp;
if (t <= -2.440545615200047e+79) {
tmp = t_1 / -t_2;
} else if (t <= 4.084731895194233e+69) {
tmp = t_1 / 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);
} else {
tmp = 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 * sqrt(Float64(Float64(2.0 / Float64(x - 1.0)) + Float64(2.0 * Float64(x / Float64(x - 1.0)))))) tmp = 0.0 if (t <= -2.440545615200047e+79) tmp = Float64(t_1 / Float64(-t_2)); elseif (t <= 4.084731895194233e+69) tmp = Float64(t_1 / ((fma(4.0, (Float64(t / x) ^ 2.0), fma(4.0, Float64(Float64(t * t) / x), fma(2.0, (Float64(l / x) ^ 2.0), Float64(2.0 * fma(t, t, Float64(l * Float64(l / x))))))) ^ 0.25) ^ 2.0)); else tmp = Float64(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 * 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]), $MachinePrecision]}, If[LessEqual[t, -2.440545615200047e+79], N[(t$95$1 / (-t$95$2)), $MachinePrecision], If[LessEqual[t, 4.084731895194233e+69], N[(t$95$1 / N[Power[N[Power[N[(4.0 * N[Power[N[(t / x), $MachinePrecision], 2.0], $MachinePrecision] + N[(4.0 * N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision] + N[(2.0 * N[Power[N[(l / x), $MachinePrecision], 2.0], $MachinePrecision] + N[(2.0 * N[(t * t + N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.25], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(t$95$1 / 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 \cdot \sqrt{\frac{2}{x - 1} + 2 \cdot \frac{x}{x - 1}}\\
\mathbf{if}\;t \leq -2.440545615200047 \cdot 10^{+79}:\\
\;\;\;\;\frac{t_1}{-t_2}\\
\mathbf{elif}\;t \leq 4.084731895194233 \cdot 10^{+69}:\\
\;\;\;\;\frac{t_1}{{\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{else}:\\
\;\;\;\;\frac{t_1}{t_2}\\
\end{array}



Bits error versus x



Bits error versus l



Bits error versus t
if t < -2.44054561520004704e79Initial program 49.0
Simplified49.0
Taylor expanded in t around -inf 2.9
Simplified2.9
if -2.44054561520004704e79 < t < 4.0847318951942331e69Initial program 40.2
Simplified40.2
Taylor expanded in x around inf 19.5
Simplified19.5
Applied egg-rr17.7
Applied egg-rr13.6
if 4.0847318951942331e69 < t Initial program 46.5
Simplified46.5
Taylor expanded in t around inf 3.5
Simplified3.5
Final simplification9.0
herbie shell --seed 2022144
(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)))))