Average Error: 43.2 → 9.5
Time: 29.3s
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 -2.923027040474124605694794819051113822068 \cdot 10^{146}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\frac{2}{\frac{\left(2 \cdot \left(x \cdot x\right)\right) \cdot \sqrt{2}}{t}} - \mathsf{fma}\left(t, \sqrt{2}, \frac{2 \cdot \frac{t}{\sqrt{2}}}{x}\right)}\\ \mathbf{elif}\;t \le 1.726148854783604554924240114575662277937 \cdot 10^{-242}:\\ \;\;\;\;\frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{t \cdot t}{x}, 4, \mathsf{fma}\left(t, t, \frac{\ell}{\sqrt[3]{x}} \cdot \frac{\frac{\ell}{\sqrt[3]{x}}}{\sqrt[3]{x}}\right) \cdot 2\right)}} \cdot t\\ \mathbf{elif}\;t \le 3.247980644380315344262592988201111260205 \cdot 10^{-157} \lor \neg \left(t \le 4.709683245749164222295759367464551529696 \cdot 10^{55}\right):\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\mathsf{fma}\left(2, \frac{\frac{t}{\sqrt{2}}}{x} - \frac{\frac{t}{x \cdot x}}{2 \cdot \sqrt{2}}, \sqrt{2} \cdot t\right)}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{t \cdot t}{x}, 4, \mathsf{fma}\left(t, t, \sqrt[3]{\frac{\ell}{\frac{x}{\ell}}} \cdot \left(\sqrt[3]{\frac{\ell}{\frac{x}{\ell}}} \cdot \sqrt[3]{\frac{\ell}{\frac{x}{\ell}}}\right)\right) \cdot 2\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 -2.923027040474124605694794819051113822068 \cdot 10^{146}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\frac{2}{\frac{\left(2 \cdot \left(x \cdot x\right)\right) \cdot \sqrt{2}}{t}} - \mathsf{fma}\left(t, \sqrt{2}, \frac{2 \cdot \frac{t}{\sqrt{2}}}{x}\right)}\\

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

\mathbf{elif}\;t \le 3.247980644380315344262592988201111260205 \cdot 10^{-157} \lor \neg \left(t \le 4.709683245749164222295759367464551529696 \cdot 10^{55}\right):\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\mathsf{fma}\left(2, \frac{\frac{t}{\sqrt{2}}}{x} - \frac{\frac{t}{x \cdot x}}{2 \cdot \sqrt{2}}, \sqrt{2} \cdot t\right)}\\

\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{t \cdot t}{x}, 4, \mathsf{fma}\left(t, t, \sqrt[3]{\frac{\ell}{\frac{x}{\ell}}} \cdot \left(\sqrt[3]{\frac{\ell}{\frac{x}{\ell}}} \cdot \sqrt[3]{\frac{\ell}{\frac{x}{\ell}}}\right)\right) \cdot 2\right)}}\\

\end{array}
double f(double x, double l, double t) {
        double r43918 = 2.0;
        double r43919 = sqrt(r43918);
        double r43920 = t;
        double r43921 = r43919 * r43920;
        double r43922 = x;
        double r43923 = 1.0;
        double r43924 = r43922 + r43923;
        double r43925 = r43922 - r43923;
        double r43926 = r43924 / r43925;
        double r43927 = l;
        double r43928 = r43927 * r43927;
        double r43929 = r43920 * r43920;
        double r43930 = r43918 * r43929;
        double r43931 = r43928 + r43930;
        double r43932 = r43926 * r43931;
        double r43933 = r43932 - r43928;
        double r43934 = sqrt(r43933);
        double r43935 = r43921 / r43934;
        return r43935;
}

double f(double x, double l, double t) {
        double r43936 = t;
        double r43937 = -2.9230270404741246e+146;
        bool r43938 = r43936 <= r43937;
        double r43939 = 2.0;
        double r43940 = sqrt(r43939);
        double r43941 = x;
        double r43942 = r43941 * r43941;
        double r43943 = r43939 * r43942;
        double r43944 = r43943 * r43940;
        double r43945 = r43944 / r43936;
        double r43946 = r43939 / r43945;
        double r43947 = r43936 / r43940;
        double r43948 = r43939 * r43947;
        double r43949 = r43948 / r43941;
        double r43950 = fma(r43936, r43940, r43949);
        double r43951 = r43946 - r43950;
        double r43952 = r43940 / r43951;
        double r43953 = r43936 * r43952;
        double r43954 = 1.7261488547836046e-242;
        bool r43955 = r43936 <= r43954;
        double r43956 = r43936 * r43936;
        double r43957 = r43956 / r43941;
        double r43958 = 4.0;
        double r43959 = l;
        double r43960 = cbrt(r43941);
        double r43961 = r43959 / r43960;
        double r43962 = r43961 / r43960;
        double r43963 = r43961 * r43962;
        double r43964 = fma(r43936, r43936, r43963);
        double r43965 = r43964 * r43939;
        double r43966 = fma(r43957, r43958, r43965);
        double r43967 = sqrt(r43966);
        double r43968 = r43940 / r43967;
        double r43969 = r43968 * r43936;
        double r43970 = 3.2479806443803153e-157;
        bool r43971 = r43936 <= r43970;
        double r43972 = 4.709683245749164e+55;
        bool r43973 = r43936 <= r43972;
        double r43974 = !r43973;
        bool r43975 = r43971 || r43974;
        double r43976 = r43947 / r43941;
        double r43977 = r43936 / r43942;
        double r43978 = r43939 * r43940;
        double r43979 = r43977 / r43978;
        double r43980 = r43976 - r43979;
        double r43981 = r43940 * r43936;
        double r43982 = fma(r43939, r43980, r43981);
        double r43983 = r43940 / r43982;
        double r43984 = r43936 * r43983;
        double r43985 = r43941 / r43959;
        double r43986 = r43959 / r43985;
        double r43987 = cbrt(r43986);
        double r43988 = r43987 * r43987;
        double r43989 = r43987 * r43988;
        double r43990 = fma(r43936, r43936, r43989);
        double r43991 = r43990 * r43939;
        double r43992 = fma(r43957, r43958, r43991);
        double r43993 = sqrt(r43992);
        double r43994 = r43940 / r43993;
        double r43995 = r43936 * r43994;
        double r43996 = r43975 ? r43984 : r43995;
        double r43997 = r43955 ? r43969 : r43996;
        double r43998 = r43938 ? r43953 : r43997;
        return r43998;
}

Error

Bits error versus x

Bits error versus l

Bits error versus t

Derivation

  1. Split input into 4 regimes
  2. if t < -2.9230270404741246e+146

    1. Initial program 60.3

      \[\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. Simplified60.3

      \[\leadsto \color{blue}{t \cdot \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(\ell, \ell, \left(t \cdot t\right) \cdot 2\right) \cdot \frac{1 + x}{x - 1} - \ell \cdot \ell}}}\]
    3. Taylor expanded around inf 60.8

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

      \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{t \cdot t}{x}, 4, 2 \cdot \mathsf{fma}\left(t, t, \frac{\ell \cdot \ell}{x}\right)\right)}}}\]
    5. Taylor expanded around -inf 2.8

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

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

    if -2.9230270404741246e+146 < t < 1.7261488547836046e-242

    1. Initial program 38.6

      \[\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. Simplified38.5

      \[\leadsto \color{blue}{t \cdot \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(\ell, \ell, \left(t \cdot t\right) \cdot 2\right) \cdot \frac{1 + x}{x - 1} - \ell \cdot \ell}}}\]
    3. Taylor expanded around inf 18.2

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

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

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

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

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

    if 1.7261488547836046e-242 < t < 3.2479806443803153e-157 or 4.709683245749164e+55 < t

    1. Initial program 49.0

      \[\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. Simplified48.9

      \[\leadsto \color{blue}{t \cdot \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(\ell, \ell, \left(t \cdot t\right) \cdot 2\right) \cdot \frac{1 + x}{x - 1} - \ell \cdot \ell}}}\]
    3. Taylor expanded around inf 43.7

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

      \[\leadsto t \cdot \frac{\sqrt{2}}{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{t \cdot t}{x}, 4, 2 \cdot \mathsf{fma}\left(t, t, \frac{\ell \cdot \ell}{x}\right)\right)}}}\]
    5. Taylor expanded around inf 9.2

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

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

    if 3.2479806443803153e-157 < t < 4.709683245749164e+55

    1. Initial program 27.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. Simplified27.1

      \[\leadsto \color{blue}{t \cdot \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(\ell, \ell, \left(t \cdot t\right) \cdot 2\right) \cdot \frac{1 + x}{x - 1} - \ell \cdot \ell}}}\]
    3. Taylor expanded around inf 9.3

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -2.923027040474124605694794819051113822068 \cdot 10^{146}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\frac{2}{\frac{\left(2 \cdot \left(x \cdot x\right)\right) \cdot \sqrt{2}}{t}} - \mathsf{fma}\left(t, \sqrt{2}, \frac{2 \cdot \frac{t}{\sqrt{2}}}{x}\right)}\\ \mathbf{elif}\;t \le 1.726148854783604554924240114575662277937 \cdot 10^{-242}:\\ \;\;\;\;\frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{t \cdot t}{x}, 4, \mathsf{fma}\left(t, t, \frac{\ell}{\sqrt[3]{x}} \cdot \frac{\frac{\ell}{\sqrt[3]{x}}}{\sqrt[3]{x}}\right) \cdot 2\right)}} \cdot t\\ \mathbf{elif}\;t \le 3.247980644380315344262592988201111260205 \cdot 10^{-157} \lor \neg \left(t \le 4.709683245749164222295759367464551529696 \cdot 10^{55}\right):\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\mathsf{fma}\left(2, \frac{\frac{t}{\sqrt{2}}}{x} - \frac{\frac{t}{x \cdot x}}{2 \cdot \sqrt{2}}, \sqrt{2} \cdot t\right)}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(\frac{t \cdot t}{x}, 4, \mathsf{fma}\left(t, t, \sqrt[3]{\frac{\ell}{\frac{x}{\ell}}} \cdot \left(\sqrt[3]{\frac{\ell}{\frac{x}{\ell}}} \cdot \sqrt[3]{\frac{\ell}{\frac{x}{\ell}}}\right)\right) \cdot 2\right)}}\\ \end{array}\]

Reproduce

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