Average Error: 42.8 → 9.0
Time: 27.5s
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 -6.377624199137871 \cdot 10^{+80}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{2}{x \cdot x} \cdot \frac{t}{2 \cdot \sqrt{2}} - \mathsf{fma}\left(\frac{2}{\sqrt{2}}, \frac{t}{x}, \sqrt{2} \cdot t\right)}\\ \mathbf{elif}\;t \le 3.3304656260583313 \cdot 10^{+124}:\\ \;\;\;\;\frac{\left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right) \cdot \left(t \cdot \sqrt[3]{\sqrt{2}}\right)}{\sqrt{\mathsf{fma}\left(t \cdot t, 2, \mathsf{fma}\left(4, \frac{t \cdot t}{x}, 2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{x \cdot \sqrt{2}} - \frac{\frac{\frac{t}{2}}{\sqrt{2}}}{x \cdot x}, \sqrt{2} \cdot t\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 -6.377624199137871 \cdot 10^{+80}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{2}{x \cdot x} \cdot \frac{t}{2 \cdot \sqrt{2}} - \mathsf{fma}\left(\frac{2}{\sqrt{2}}, \frac{t}{x}, \sqrt{2} \cdot t\right)}\\

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

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

\end{array}
double f(double x, double l, double t) {
        double r469936 = 2.0;
        double r469937 = sqrt(r469936);
        double r469938 = t;
        double r469939 = r469937 * r469938;
        double r469940 = x;
        double r469941 = 1.0;
        double r469942 = r469940 + r469941;
        double r469943 = r469940 - r469941;
        double r469944 = r469942 / r469943;
        double r469945 = l;
        double r469946 = r469945 * r469945;
        double r469947 = r469938 * r469938;
        double r469948 = r469936 * r469947;
        double r469949 = r469946 + r469948;
        double r469950 = r469944 * r469949;
        double r469951 = r469950 - r469946;
        double r469952 = sqrt(r469951);
        double r469953 = r469939 / r469952;
        return r469953;
}

double f(double x, double l, double t) {
        double r469954 = t;
        double r469955 = -6.377624199137871e+80;
        bool r469956 = r469954 <= r469955;
        double r469957 = 2.0;
        double r469958 = sqrt(r469957);
        double r469959 = r469958 * r469954;
        double r469960 = x;
        double r469961 = r469960 * r469960;
        double r469962 = r469957 / r469961;
        double r469963 = r469957 * r469958;
        double r469964 = r469954 / r469963;
        double r469965 = r469962 * r469964;
        double r469966 = r469957 / r469958;
        double r469967 = r469954 / r469960;
        double r469968 = fma(r469966, r469967, r469959);
        double r469969 = r469965 - r469968;
        double r469970 = r469959 / r469969;
        double r469971 = 3.3304656260583313e+124;
        bool r469972 = r469954 <= r469971;
        double r469973 = cbrt(r469958);
        double r469974 = r469973 * r469973;
        double r469975 = r469954 * r469973;
        double r469976 = r469974 * r469975;
        double r469977 = r469954 * r469954;
        double r469978 = 4.0;
        double r469979 = r469977 / r469960;
        double r469980 = l;
        double r469981 = r469980 / r469960;
        double r469982 = r469980 * r469981;
        double r469983 = r469957 * r469982;
        double r469984 = fma(r469978, r469979, r469983);
        double r469985 = fma(r469977, r469957, r469984);
        double r469986 = sqrt(r469985);
        double r469987 = r469976 / r469986;
        double r469988 = r469960 * r469958;
        double r469989 = r469954 / r469988;
        double r469990 = r469954 / r469957;
        double r469991 = r469990 / r469958;
        double r469992 = r469991 / r469961;
        double r469993 = r469989 - r469992;
        double r469994 = fma(r469957, r469993, r469959);
        double r469995 = r469959 / r469994;
        double r469996 = r469972 ? r469987 : r469995;
        double r469997 = r469956 ? r469970 : r469996;
        return r469997;
}

Error

Bits error versus x

Bits error versus l

Bits error versus t

Derivation

  1. Split input into 3 regimes
  2. if t < -6.377624199137871e+80

    1. Initial program 48.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 47.9

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\mathsf{fma}\left(t \cdot t, 2, \mathsf{fma}\left(4, \frac{t \cdot t}{x}, \frac{\ell \cdot \ell}{x} \cdot 2\right)\right)}}}\]
    4. Using strategy rm
    5. Applied *-un-lft-identity47.9

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

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

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

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

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

    if -6.377624199137871e+80 < t < 3.3304656260583313e+124

    1. Initial program 37.5

      \[\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(t \cdot t, 2, \mathsf{fma}\left(4, \frac{t \cdot t}{x}, \frac{\ell \cdot \ell}{x} \cdot 2\right)\right)}}}\]
    4. Using strategy rm
    5. Applied *-un-lft-identity17.3

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

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

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

      \[\leadsto \frac{\color{blue}{\left(\left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right) \cdot \sqrt[3]{\sqrt{2}}\right)} \cdot t}{\sqrt{\mathsf{fma}\left(t \cdot t, 2, \mathsf{fma}\left(4, \frac{t \cdot t}{x}, \left(\ell \cdot \frac{\ell}{x}\right) \cdot 2\right)\right)}}\]
    10. Applied associate-*l*13.1

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

    if 3.3304656260583313e+124 < t

    1. Initial program 54.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. Taylor expanded around -inf 54.2

      \[\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. Simplified54.2

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

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

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

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

Reproduce

herbie shell --seed 2019152 +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)))))