Average Error: 42.9 → 9.5
Time: 29.1s
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 -58247696904127.2109375:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{2}{2 \cdot \sqrt{2}}, \frac{t}{x \cdot x}, -\mathsf{fma}\left(\frac{2}{\sqrt{2}}, \frac{t}{x}, \mathsf{fma}\left(t, \sqrt{2}, \frac{t}{x \cdot x} \cdot \frac{2}{\sqrt{2}}\right)\right)\right)}\\ \mathbf{elif}\;t \le -5.242249805913045867450090915214772954844 \cdot 10^{-178}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(4, \frac{t \cdot t}{x}, 2 \cdot \mathsf{fma}\left(\sqrt[3]{\frac{\ell}{\frac{x}{\ell}}} \cdot \sqrt[3]{\frac{\ell}{\frac{x}{\ell}}}, \sqrt[3]{\frac{\ell}{\frac{x}{\ell}}}, t \cdot t\right)\right)}}\\ \mathbf{elif}\;t \le -1.767112184427095362325496880045283600293 \cdot 10^{-207}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{2}{2 \cdot \sqrt{2}}, \frac{t}{x \cdot x}, -\mathsf{fma}\left(\frac{2}{\sqrt{2}}, \frac{t}{x}, \mathsf{fma}\left(t, \sqrt{2}, \frac{t}{x \cdot x} \cdot \frac{2}{\sqrt{2}}\right)\right)\right)}\\ \mathbf{elif}\;t \le 2.446206220376988800454247232960358210718 \cdot 10^{64}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(4, \frac{t \cdot t}{x}, \left(\sqrt{t \cdot t + \frac{\ell}{\frac{x}{\ell}}} \cdot \sqrt{t \cdot t + \frac{\ell}{\frac{x}{\ell}}}\right) \cdot 2\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{2}{x}, \frac{t}{\sqrt{2}}, \left(\frac{\frac{t}{\sqrt{2}}}{x \cdot x} - \frac{t}{\left(x \cdot x\right) \cdot \left(2 \cdot \sqrt{2}\right)}\right) \cdot 2 + \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 -58247696904127.2109375:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{2}{2 \cdot \sqrt{2}}, \frac{t}{x \cdot x}, -\mathsf{fma}\left(\frac{2}{\sqrt{2}}, \frac{t}{x}, \mathsf{fma}\left(t, \sqrt{2}, \frac{t}{x \cdot x} \cdot \frac{2}{\sqrt{2}}\right)\right)\right)}\\

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

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

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

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

\end{array}
double f(double x, double l, double t) {
        double r1170080 = 2.0;
        double r1170081 = sqrt(r1170080);
        double r1170082 = t;
        double r1170083 = r1170081 * r1170082;
        double r1170084 = x;
        double r1170085 = 1.0;
        double r1170086 = r1170084 + r1170085;
        double r1170087 = r1170084 - r1170085;
        double r1170088 = r1170086 / r1170087;
        double r1170089 = l;
        double r1170090 = r1170089 * r1170089;
        double r1170091 = r1170082 * r1170082;
        double r1170092 = r1170080 * r1170091;
        double r1170093 = r1170090 + r1170092;
        double r1170094 = r1170088 * r1170093;
        double r1170095 = r1170094 - r1170090;
        double r1170096 = sqrt(r1170095);
        double r1170097 = r1170083 / r1170096;
        return r1170097;
}

double f(double x, double l, double t) {
        double r1170098 = t;
        double r1170099 = -58247696904127.21;
        bool r1170100 = r1170098 <= r1170099;
        double r1170101 = 2.0;
        double r1170102 = sqrt(r1170101);
        double r1170103 = r1170102 * r1170098;
        double r1170104 = r1170101 * r1170102;
        double r1170105 = r1170101 / r1170104;
        double r1170106 = x;
        double r1170107 = r1170106 * r1170106;
        double r1170108 = r1170098 / r1170107;
        double r1170109 = r1170101 / r1170102;
        double r1170110 = r1170098 / r1170106;
        double r1170111 = r1170108 * r1170109;
        double r1170112 = fma(r1170098, r1170102, r1170111);
        double r1170113 = fma(r1170109, r1170110, r1170112);
        double r1170114 = -r1170113;
        double r1170115 = fma(r1170105, r1170108, r1170114);
        double r1170116 = r1170103 / r1170115;
        double r1170117 = -5.242249805913046e-178;
        bool r1170118 = r1170098 <= r1170117;
        double r1170119 = 4.0;
        double r1170120 = r1170098 * r1170098;
        double r1170121 = r1170120 / r1170106;
        double r1170122 = l;
        double r1170123 = r1170106 / r1170122;
        double r1170124 = r1170122 / r1170123;
        double r1170125 = cbrt(r1170124);
        double r1170126 = r1170125 * r1170125;
        double r1170127 = fma(r1170126, r1170125, r1170120);
        double r1170128 = r1170101 * r1170127;
        double r1170129 = fma(r1170119, r1170121, r1170128);
        double r1170130 = sqrt(r1170129);
        double r1170131 = r1170103 / r1170130;
        double r1170132 = -1.7671121844270954e-207;
        bool r1170133 = r1170098 <= r1170132;
        double r1170134 = 2.4462062203769888e+64;
        bool r1170135 = r1170098 <= r1170134;
        double r1170136 = r1170120 + r1170124;
        double r1170137 = sqrt(r1170136);
        double r1170138 = r1170137 * r1170137;
        double r1170139 = r1170138 * r1170101;
        double r1170140 = fma(r1170119, r1170121, r1170139);
        double r1170141 = sqrt(r1170140);
        double r1170142 = r1170103 / r1170141;
        double r1170143 = r1170101 / r1170106;
        double r1170144 = r1170098 / r1170102;
        double r1170145 = r1170144 / r1170107;
        double r1170146 = r1170107 * r1170104;
        double r1170147 = r1170098 / r1170146;
        double r1170148 = r1170145 - r1170147;
        double r1170149 = r1170148 * r1170101;
        double r1170150 = r1170149 + r1170103;
        double r1170151 = fma(r1170143, r1170144, r1170150);
        double r1170152 = r1170103 / r1170151;
        double r1170153 = r1170135 ? r1170142 : r1170152;
        double r1170154 = r1170133 ? r1170116 : r1170153;
        double r1170155 = r1170118 ? r1170131 : r1170154;
        double r1170156 = r1170100 ? r1170116 : r1170155;
        return r1170156;
}

Error

Bits error versus x

Bits error versus l

Bits error versus t

Derivation

  1. Split input into 4 regimes
  2. if t < -58247696904127.21 or -5.242249805913046e-178 < t < -1.7671121844270954e-207

    1. Initial program 44.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. Taylor expanded around -inf 6.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} + \left(\sqrt{2} \cdot t + 2 \cdot \frac{t}{\sqrt{2} \cdot {x}^{2}}\right)\right)}}\]
    3. Simplified6.5

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

    if -58247696904127.21 < t < -5.242249805913046e-178

    1. Initial program 33.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 12.5

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\mathsf{fma}\left(4, \frac{t \cdot t}{x}, 2 \cdot \left(\frac{\ell \cdot \ell}{x} + t \cdot t\right)\right)}}}\]
    4. Using strategy rm
    5. Applied associate-/l*7.8

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

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

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

    if -1.7671121844270954e-207 < t < 2.4462062203769888e+64

    1. Initial program 44.4

      \[\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 20.7

      \[\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. Simplified20.7

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\mathsf{fma}\left(4, \frac{t \cdot t}{x}, 2 \cdot \left(\frac{\ell \cdot \ell}{x} + t \cdot t\right)\right)}}}\]
    4. Using strategy rm
    5. Applied associate-/l*17.3

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

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

    if 2.4462062203769888e+64 < t

    1. Initial program 45.4

      \[\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.6

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -58247696904127.2109375:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{2}{2 \cdot \sqrt{2}}, \frac{t}{x \cdot x}, -\mathsf{fma}\left(\frac{2}{\sqrt{2}}, \frac{t}{x}, \mathsf{fma}\left(t, \sqrt{2}, \frac{t}{x \cdot x} \cdot \frac{2}{\sqrt{2}}\right)\right)\right)}\\ \mathbf{elif}\;t \le -5.242249805913045867450090915214772954844 \cdot 10^{-178}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(4, \frac{t \cdot t}{x}, 2 \cdot \mathsf{fma}\left(\sqrt[3]{\frac{\ell}{\frac{x}{\ell}}} \cdot \sqrt[3]{\frac{\ell}{\frac{x}{\ell}}}, \sqrt[3]{\frac{\ell}{\frac{x}{\ell}}}, t \cdot t\right)\right)}}\\ \mathbf{elif}\;t \le -1.767112184427095362325496880045283600293 \cdot 10^{-207}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{2}{2 \cdot \sqrt{2}}, \frac{t}{x \cdot x}, -\mathsf{fma}\left(\frac{2}{\sqrt{2}}, \frac{t}{x}, \mathsf{fma}\left(t, \sqrt{2}, \frac{t}{x \cdot x} \cdot \frac{2}{\sqrt{2}}\right)\right)\right)}\\ \mathbf{elif}\;t \le 2.446206220376988800454247232960358210718 \cdot 10^{64}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(4, \frac{t \cdot t}{x}, \left(\sqrt{t \cdot t + \frac{\ell}{\frac{x}{\ell}}} \cdot \sqrt{t \cdot t + \frac{\ell}{\frac{x}{\ell}}}\right) \cdot 2\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{2}{x}, \frac{t}{\sqrt{2}}, \left(\frac{\frac{t}{\sqrt{2}}}{x \cdot x} - \frac{t}{\left(x \cdot x\right) \cdot \left(2 \cdot \sqrt{2}\right)}\right) \cdot 2 + \sqrt{2} \cdot t\right)}\\ \end{array}\]

Reproduce

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