(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 (/ l (/ x l)))
(t_2 (sqrt (+ (/ 2.0 (+ x -1.0)) (* 2.0 (/ x (+ x -1.0))))))
(t_3 (* t (sqrt 2.0)))
(t_4 (/ t_3 (* t_2 (- t))))
(t_5
(/
t_3
(pow
(sqrt
(sqrt
(fma
4.0
(pow (/ t x) 2.0)
(fma (/ (* t t) x) 4.0 (* 2.0 (+ (+ (* t t) t_1) (/ t_1 x)))))))
2.0))))
(if (<= t -1.571665268792021e+71)
t_4
(if (<= t -1.0337511219279627e-137)
t_5
(if (<= t -3.555419331691467e-260)
t_4
(if (<= t 2.2762156236312662e+86) t_5 (/ t_3 (* 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 = l / (x / l);
double t_2 = sqrt(((2.0 / (x + -1.0)) + (2.0 * (x / (x + -1.0)))));
double t_3 = t * sqrt(2.0);
double t_4 = t_3 / (t_2 * -t);
double t_5 = t_3 / pow(sqrt(sqrt(fma(4.0, pow((t / x), 2.0), fma(((t * t) / x), 4.0, (2.0 * (((t * t) + t_1) + (t_1 / x))))))), 2.0);
double tmp;
if (t <= -1.571665268792021e+71) {
tmp = t_4;
} else if (t <= -1.0337511219279627e-137) {
tmp = t_5;
} else if (t <= -3.555419331691467e-260) {
tmp = t_4;
} else if (t <= 2.2762156236312662e+86) {
tmp = t_5;
} else {
tmp = t_3 / (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(l / Float64(x / l)) t_2 = sqrt(Float64(Float64(2.0 / Float64(x + -1.0)) + Float64(2.0 * Float64(x / Float64(x + -1.0))))) t_3 = Float64(t * sqrt(2.0)) t_4 = Float64(t_3 / Float64(t_2 * Float64(-t))) t_5 = Float64(t_3 / (sqrt(sqrt(fma(4.0, (Float64(t / x) ^ 2.0), fma(Float64(Float64(t * t) / x), 4.0, Float64(2.0 * Float64(Float64(Float64(t * t) + t_1) + Float64(t_1 / x))))))) ^ 2.0)) tmp = 0.0 if (t <= -1.571665268792021e+71) tmp = t_4; elseif (t <= -1.0337511219279627e-137) tmp = t_5; elseif (t <= -3.555419331691467e-260) tmp = t_4; elseif (t <= 2.2762156236312662e+86) tmp = t_5; else tmp = Float64(t_3 / 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[(l / N[(x / l), $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]}, Block[{t$95$3 = N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 / N[(t$95$2 * (-t)), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$3 / N[Power[N[Sqrt[N[Sqrt[N[(4.0 * N[Power[N[(t / x), $MachinePrecision], 2.0], $MachinePrecision] + N[(N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision] * 4.0 + N[(2.0 * N[(N[(N[(t * t), $MachinePrecision] + t$95$1), $MachinePrecision] + N[(t$95$1 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.571665268792021e+71], t$95$4, If[LessEqual[t, -1.0337511219279627e-137], t$95$5, If[LessEqual[t, -3.555419331691467e-260], t$95$4, If[LessEqual[t, 2.2762156236312662e+86], t$95$5, N[(t$95$3 / 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 := \frac{\ell}{\frac{x}{\ell}}\\
t_2 := \sqrt{\frac{2}{x + -1} + 2 \cdot \frac{x}{x + -1}}\\
t_3 := t \cdot \sqrt{2}\\
t_4 := \frac{t_3}{t_2 \cdot \left(-t\right)}\\
t_5 := \frac{t_3}{{\left(\sqrt{\sqrt{\mathsf{fma}\left(4, {\left(\frac{t}{x}\right)}^{2}, \mathsf{fma}\left(\frac{t \cdot t}{x}, 4, 2 \cdot \left(\left(t \cdot t + t_1\right) + \frac{t_1}{x}\right)\right)\right)}}\right)}^{2}}\\
\mathbf{if}\;t \leq -1.571665268792021 \cdot 10^{+71}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t \leq -1.0337511219279627 \cdot 10^{-137}:\\
\;\;\;\;t_5\\
\mathbf{elif}\;t \leq -3.555419331691467 \cdot 10^{-260}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t \leq 2.2762156236312662 \cdot 10^{+86}:\\
\;\;\;\;t_5\\
\mathbf{else}:\\
\;\;\;\;\frac{t_3}{t \cdot t_2}\\
\end{array}



Bits error versus x



Bits error versus l



Bits error versus t
if t < -1.57166526879202102e71 or -1.03375112192796272e-137 < t < -3.55541933169146715e-260Initial program 49.8
Taylor expanded in t around -inf 10.6
Simplified10.6
if -1.57166526879202102e71 < t < -1.03375112192796272e-137 or -3.55541933169146715e-260 < t < 2.2762156236312662e86Initial program 35.7
Taylor expanded in x around inf 16.7
Simplified16.7
Applied egg-rr16.8
Taylor expanded in x around inf 16.2
Simplified10.7
if 2.2762156236312662e86 < t Initial program 49.6
Taylor expanded in t around inf 2.7
Simplified2.7
Final simplification9.0
herbie shell --seed 2022153
(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)))))