Average Error: 42.3 → 9.0
Time: 25.8s
Precision: 64
\[\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 \le -3.6519455046374026 \cdot 10^{+98}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{\frac{\frac{t}{\sqrt{2}}}{2}}{x \cdot x}, 2, -\mathsf{fma}\left(\frac{2}{x}, \frac{t}{\sqrt{2}}, \mathsf{fma}\left(t, \sqrt{2}, \frac{2}{x} \cdot \frac{\frac{t}{\sqrt{2}}}{x}\right)\right)\right)}\\ \mathbf{elif}\;t \le 1.4235245726759946 \cdot 10^{+99}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\sqrt{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(\frac{t \cdot t}{x}, 4, 2 \cdot \left(\frac{\ell}{\sqrt[3]{x} \cdot \sqrt[3]{x}} \cdot \frac{\ell}{\sqrt[3]{x}}\right)\right)\right)}} \cdot \sqrt{\sqrt{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(\frac{t \cdot t}{x}, 4, 2 \cdot \left(\frac{\ell}{\sqrt[3]{x} \cdot \sqrt[3]{x}} \cdot \frac{\ell}{\sqrt[3]{x}}\right)\right)\right)}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(-2, \frac{\frac{\frac{t}{\sqrt{2}}}{2}}{x \cdot x}, \mathsf{fma}\left(\frac{2}{x}, \frac{t}{\sqrt{2}}, \mathsf{fma}\left(t, \sqrt{2}, \frac{2}{x} \cdot \frac{\frac{t}{\sqrt{2}}}{x}\right)\right)\right)}\\ \end{array}\]
\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 \le -3.6519455046374026 \cdot 10^{+98}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{\frac{\frac{t}{\sqrt{2}}}{2}}{x \cdot x}, 2, -\mathsf{fma}\left(\frac{2}{x}, \frac{t}{\sqrt{2}}, \mathsf{fma}\left(t, \sqrt{2}, \frac{2}{x} \cdot \frac{\frac{t}{\sqrt{2}}}{x}\right)\right)\right)}\\

\mathbf{elif}\;t \le 1.4235245726759946 \cdot 10^{+99}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\sqrt{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(\frac{t \cdot t}{x}, 4, 2 \cdot \left(\frac{\ell}{\sqrt[3]{x} \cdot \sqrt[3]{x}} \cdot \frac{\ell}{\sqrt[3]{x}}\right)\right)\right)}} \cdot \sqrt{\sqrt{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(\frac{t \cdot t}{x}, 4, 2 \cdot \left(\frac{\ell}{\sqrt[3]{x} \cdot \sqrt[3]{x}} \cdot \frac{\ell}{\sqrt[3]{x}}\right)\right)\right)}}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(-2, \frac{\frac{\frac{t}{\sqrt{2}}}{2}}{x \cdot x}, \mathsf{fma}\left(\frac{2}{x}, \frac{t}{\sqrt{2}}, \mathsf{fma}\left(t, \sqrt{2}, \frac{2}{x} \cdot \frac{\frac{t}{\sqrt{2}}}{x}\right)\right)\right)}\\

\end{array}
double f(double x, double l, double t) {
        double r1058985 = 2.0;
        double r1058986 = sqrt(r1058985);
        double r1058987 = t;
        double r1058988 = r1058986 * r1058987;
        double r1058989 = x;
        double r1058990 = 1.0;
        double r1058991 = r1058989 + r1058990;
        double r1058992 = r1058989 - r1058990;
        double r1058993 = r1058991 / r1058992;
        double r1058994 = l;
        double r1058995 = r1058994 * r1058994;
        double r1058996 = r1058987 * r1058987;
        double r1058997 = r1058985 * r1058996;
        double r1058998 = r1058995 + r1058997;
        double r1058999 = r1058993 * r1058998;
        double r1059000 = r1058999 - r1058995;
        double r1059001 = sqrt(r1059000);
        double r1059002 = r1058988 / r1059001;
        return r1059002;
}

double f(double x, double l, double t) {
        double r1059003 = t;
        double r1059004 = -3.6519455046374026e+98;
        bool r1059005 = r1059003 <= r1059004;
        double r1059006 = 2.0;
        double r1059007 = sqrt(r1059006);
        double r1059008 = r1059007 * r1059003;
        double r1059009 = r1059003 / r1059007;
        double r1059010 = r1059009 / r1059006;
        double r1059011 = x;
        double r1059012 = r1059011 * r1059011;
        double r1059013 = r1059010 / r1059012;
        double r1059014 = r1059006 / r1059011;
        double r1059015 = r1059009 / r1059011;
        double r1059016 = r1059014 * r1059015;
        double r1059017 = fma(r1059003, r1059007, r1059016);
        double r1059018 = fma(r1059014, r1059009, r1059017);
        double r1059019 = -r1059018;
        double r1059020 = fma(r1059013, r1059006, r1059019);
        double r1059021 = r1059008 / r1059020;
        double r1059022 = 1.4235245726759946e+99;
        bool r1059023 = r1059003 <= r1059022;
        double r1059024 = r1059003 * r1059003;
        double r1059025 = r1059024 / r1059011;
        double r1059026 = 4.0;
        double r1059027 = l;
        double r1059028 = cbrt(r1059011);
        double r1059029 = r1059028 * r1059028;
        double r1059030 = r1059027 / r1059029;
        double r1059031 = r1059027 / r1059028;
        double r1059032 = r1059030 * r1059031;
        double r1059033 = r1059006 * r1059032;
        double r1059034 = fma(r1059025, r1059026, r1059033);
        double r1059035 = fma(r1059006, r1059024, r1059034);
        double r1059036 = sqrt(r1059035);
        double r1059037 = sqrt(r1059036);
        double r1059038 = r1059037 * r1059037;
        double r1059039 = r1059008 / r1059038;
        double r1059040 = -2.0;
        double r1059041 = fma(r1059040, r1059013, r1059018);
        double r1059042 = r1059008 / r1059041;
        double r1059043 = r1059023 ? r1059039 : r1059042;
        double r1059044 = r1059005 ? r1059021 : r1059043;
        return r1059044;
}

Error

Bits error versus x

Bits error versus l

Bits error versus t

Derivation

  1. Split input into 3 regimes
  2. if t < -3.6519455046374026e+98

    1. Initial program 48.9

      \[\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}}\]
    2. Taylor expanded around -inf 2.5

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \left(2 \cdot \frac{t}{\sqrt{2} \cdot {x}^{2}} + \left(t \cdot \sqrt{2} + 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)\right)}}\]
    3. Simplified2.5

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{\mathsf{fma}\left(\frac{\frac{\frac{t}{\sqrt{2}}}{2}}{x \cdot x}, 2, -\mathsf{fma}\left(\frac{2}{x}, \frac{t}{\sqrt{2}}, \mathsf{fma}\left(t, \sqrt{2}, \frac{2}{x} \cdot \frac{\frac{t}{\sqrt{2}}}{x}\right)\right)\right)}}\]

    if -3.6519455046374026e+98 < t < 1.4235245726759946e+99

    1. Initial program 37.8

      \[\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}}\]
    2. Taylor expanded around inf 17.3

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot {t}^{2} + \left(2 \cdot \frac{{\ell}^{2}}{x} + 4 \cdot \frac{{t}^{2}}{x}\right)}}}\]
    3. Simplified17.3

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(\frac{t \cdot t}{x}, 4, \frac{\ell \cdot \ell}{x} \cdot 2\right)\right)}}}\]
    4. Using strategy rm
    5. Applied add-cube-cbrt17.4

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(\frac{t \cdot t}{x}, 4, \frac{\ell \cdot \ell}{\color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}}} \cdot 2\right)\right)}}\]
    6. Applied times-frac12.9

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(\frac{t \cdot t}{x}, 4, \color{blue}{\left(\frac{\ell}{\sqrt[3]{x} \cdot \sqrt[3]{x}} \cdot \frac{\ell}{\sqrt[3]{x}}\right)} \cdot 2\right)\right)}}\]
    7. Using strategy rm
    8. Applied add-sqr-sqrt12.9

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\sqrt{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(\frac{t \cdot t}{x}, 4, \left(\frac{\ell}{\sqrt[3]{x} \cdot \sqrt[3]{x}} \cdot \frac{\ell}{\sqrt[3]{x}}\right) \cdot 2\right)\right)} \cdot \sqrt{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(\frac{t \cdot t}{x}, 4, \left(\frac{\ell}{\sqrt[3]{x} \cdot \sqrt[3]{x}} \cdot \frac{\ell}{\sqrt[3]{x}}\right) \cdot 2\right)\right)}}}}\]
    9. Applied sqrt-prod13.1

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{\sqrt{\sqrt{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(\frac{t \cdot t}{x}, 4, \left(\frac{\ell}{\sqrt[3]{x} \cdot \sqrt[3]{x}} \cdot \frac{\ell}{\sqrt[3]{x}}\right) \cdot 2\right)\right)}} \cdot \sqrt{\sqrt{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(\frac{t \cdot t}{x}, 4, \left(\frac{\ell}{\sqrt[3]{x} \cdot \sqrt[3]{x}} \cdot \frac{\ell}{\sqrt[3]{x}}\right) \cdot 2\right)\right)}}}}\]

    if 1.4235245726759946e+99 < t

    1. Initial program 49.1

      \[\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}}\]
    2. Taylor expanded around inf 3.3

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{\left(2 \cdot \frac{t}{\sqrt{2} \cdot {x}^{2}} + \left(t \cdot \sqrt{2} + 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)\right) - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}}}\]
    3. Simplified3.3

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{\mathsf{fma}\left(-2, \frac{\frac{\frac{t}{\sqrt{2}}}{2}}{x \cdot x}, \mathsf{fma}\left(\frac{2}{x}, \frac{t}{\sqrt{2}}, \mathsf{fma}\left(t, \sqrt{2}, \frac{2}{x} \cdot \frac{\frac{t}{\sqrt{2}}}{x}\right)\right)\right)}}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification9.0

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -3.6519455046374026 \cdot 10^{+98}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{\frac{\frac{t}{\sqrt{2}}}{2}}{x \cdot x}, 2, -\mathsf{fma}\left(\frac{2}{x}, \frac{t}{\sqrt{2}}, \mathsf{fma}\left(t, \sqrt{2}, \frac{2}{x} \cdot \frac{\frac{t}{\sqrt{2}}}{x}\right)\right)\right)}\\ \mathbf{elif}\;t \le 1.4235245726759946 \cdot 10^{+99}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\sqrt{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(\frac{t \cdot t}{x}, 4, 2 \cdot \left(\frac{\ell}{\sqrt[3]{x} \cdot \sqrt[3]{x}} \cdot \frac{\ell}{\sqrt[3]{x}}\right)\right)\right)}} \cdot \sqrt{\sqrt{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(\frac{t \cdot t}{x}, 4, 2 \cdot \left(\frac{\ell}{\sqrt[3]{x} \cdot \sqrt[3]{x}} \cdot \frac{\ell}{\sqrt[3]{x}}\right)\right)\right)}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(-2, \frac{\frac{\frac{t}{\sqrt{2}}}{2}}{x \cdot x}, \mathsf{fma}\left(\frac{2}{x}, \frac{t}{\sqrt{2}}, \mathsf{fma}\left(t, \sqrt{2}, \frac{2}{x} \cdot \frac{\frac{t}{\sqrt{2}}}{x}\right)\right)\right)}\\ \end{array}\]

Reproduce

herbie shell --seed 2019168 +o rules:numerics
(FPCore (x l t)
  :name "Toniolo and Linder, Equation (7)"
  (/ (* (sqrt 2) t) (sqrt (- (* (/ (+ x 1) (- x 1)) (+ (* l l) (* 2 (* t t)))) (* l l)))))