Average Error: 43.1 → 9.7
Time: 27.6s
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 -9.558743729877633368611289028032876793876 \cdot 10^{120}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{-\mathsf{fma}\left(t, \sqrt{2}, 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}\\ \mathbf{elif}\;t \le -1.899175960211412065264410904053819483899 \cdot 10^{-162}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, \mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right), 4 \cdot \frac{{t}^{2}}{x}\right)}}\\ \mathbf{elif}\;t \le -8.369500437659910203743124780157928237055 \cdot 10^{-193}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{-\mathsf{fma}\left(t, \sqrt{2}, 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}\\ \mathbf{elif}\;t \le 3.155486028136924257976948321778373331679 \cdot 10^{-278} \lor \neg \left(t \le 1.96678984226063996280598897990826570745 \cdot 10^{-145} \lor \neg \left(t \le 1499405711287109956825219767892450870297000\right)\right):\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, \mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right), 4 \cdot \frac{{t}^{2}}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(t, \sqrt{2}, 2 \cdot \frac{t}{\sqrt{2} \cdot x}\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 -9.558743729877633368611289028032876793876 \cdot 10^{120}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{-\mathsf{fma}\left(t, \sqrt{2}, 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}\\

\mathbf{elif}\;t \le -1.899175960211412065264410904053819483899 \cdot 10^{-162}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, \mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right), 4 \cdot \frac{{t}^{2}}{x}\right)}}\\

\mathbf{elif}\;t \le -8.369500437659910203743124780157928237055 \cdot 10^{-193}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{-\mathsf{fma}\left(t, \sqrt{2}, 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}\\

\mathbf{elif}\;t \le 3.155486028136924257976948321778373331679 \cdot 10^{-278} \lor \neg \left(t \le 1.96678984226063996280598897990826570745 \cdot 10^{-145} \lor \neg \left(t \le 1499405711287109956825219767892450870297000\right)\right):\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, \mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right), 4 \cdot \frac{{t}^{2}}{x}\right)}}\\

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

\end{array}
double f(double x, double l, double t) {
        double r40135 = 2.0;
        double r40136 = sqrt(r40135);
        double r40137 = t;
        double r40138 = r40136 * r40137;
        double r40139 = x;
        double r40140 = 1.0;
        double r40141 = r40139 + r40140;
        double r40142 = r40139 - r40140;
        double r40143 = r40141 / r40142;
        double r40144 = l;
        double r40145 = r40144 * r40144;
        double r40146 = r40137 * r40137;
        double r40147 = r40135 * r40146;
        double r40148 = r40145 + r40147;
        double r40149 = r40143 * r40148;
        double r40150 = r40149 - r40145;
        double r40151 = sqrt(r40150);
        double r40152 = r40138 / r40151;
        return r40152;
}

double f(double x, double l, double t) {
        double r40153 = t;
        double r40154 = -9.558743729877633e+120;
        bool r40155 = r40153 <= r40154;
        double r40156 = 2.0;
        double r40157 = sqrt(r40156);
        double r40158 = r40157 * r40153;
        double r40159 = x;
        double r40160 = r40157 * r40159;
        double r40161 = r40153 / r40160;
        double r40162 = r40156 * r40161;
        double r40163 = fma(r40153, r40157, r40162);
        double r40164 = -r40163;
        double r40165 = r40158 / r40164;
        double r40166 = -1.899175960211412e-162;
        bool r40167 = r40153 <= r40166;
        double r40168 = l;
        double r40169 = r40159 / r40168;
        double r40170 = r40168 / r40169;
        double r40171 = fma(r40153, r40153, r40170);
        double r40172 = 4.0;
        double r40173 = 2.0;
        double r40174 = pow(r40153, r40173);
        double r40175 = r40174 / r40159;
        double r40176 = r40172 * r40175;
        double r40177 = fma(r40156, r40171, r40176);
        double r40178 = sqrt(r40177);
        double r40179 = r40158 / r40178;
        double r40180 = -8.36950043765991e-193;
        bool r40181 = r40153 <= r40180;
        double r40182 = 3.155486028136924e-278;
        bool r40183 = r40153 <= r40182;
        double r40184 = 1.96678984226064e-145;
        bool r40185 = r40153 <= r40184;
        double r40186 = 1.49940571128711e+42;
        bool r40187 = r40153 <= r40186;
        double r40188 = !r40187;
        bool r40189 = r40185 || r40188;
        double r40190 = !r40189;
        bool r40191 = r40183 || r40190;
        double r40192 = r40158 / r40163;
        double r40193 = r40191 ? r40179 : r40192;
        double r40194 = r40181 ? r40165 : r40193;
        double r40195 = r40167 ? r40179 : r40194;
        double r40196 = r40155 ? r40165 : r40195;
        return r40196;
}

Error

Bits error versus x

Bits error versus l

Bits error versus t

Derivation

  1. Split input into 3 regimes
  2. if t < -9.558743729877633e+120 or -1.899175960211412e-162 < t < -8.36950043765991e-193

    1. Initial program 56.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. Simplified56.0

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

      \[\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)}}}\]
    4. Simplified53.8

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

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

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

    if -9.558743729877633e+120 < t < -1.899175960211412e-162 or -8.36950043765991e-193 < t < 3.155486028136924e-278 or 1.96678984226064e-145 < t < 1.49940571128711e+42

    1. Initial program 34.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. Simplified34.5

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

      \[\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)}}}\]
    4. Simplified14.4

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

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

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

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

    if 3.155486028136924e-278 < t < 1.96678984226064e-145 or 1.49940571128711e+42 < t

    1. Initial program 47.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. Simplified47.6

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

      \[\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)}}}\]
    4. Simplified39.6

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{t \cdot \sqrt{2} + 2 \cdot \frac{t}{\sqrt{2} \cdot x}}}\]
    6. Simplified11.5

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -9.558743729877633368611289028032876793876 \cdot 10^{120}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{-\mathsf{fma}\left(t, \sqrt{2}, 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}\\ \mathbf{elif}\;t \le -1.899175960211412065264410904053819483899 \cdot 10^{-162}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, \mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right), 4 \cdot \frac{{t}^{2}}{x}\right)}}\\ \mathbf{elif}\;t \le -8.369500437659910203743124780157928237055 \cdot 10^{-193}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{-\mathsf{fma}\left(t, \sqrt{2}, 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}\\ \mathbf{elif}\;t \le 3.155486028136924257976948321778373331679 \cdot 10^{-278} \lor \neg \left(t \le 1.96678984226063996280598897990826570745 \cdot 10^{-145} \lor \neg \left(t \le 1499405711287109956825219767892450870297000\right)\right):\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, \mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right), 4 \cdot \frac{{t}^{2}}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(t, \sqrt{2}, 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}\\ \end{array}\]

Reproduce

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