Average Error: 42.5 → 9.6
Time: 37.4s
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 -4.4981693604397794 \cdot 10^{-29}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{2}{x \cdot x} \cdot \frac{\frac{t}{\sqrt{2}}}{2} - \frac{2 \cdot \frac{t}{\sqrt{2}}}{x}\right) - \sqrt{2} \cdot t}\\ \mathbf{elif}\;t \le 1.0624147501299982 \cdot 10^{-249}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(t \cdot t + \ell \cdot \frac{\ell}{x}\right) + \frac{4}{x} \cdot \left(t \cdot t\right)}}\\ \mathbf{elif}\;t \le 1.5173692864293495 \cdot 10^{-227}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{\frac{t}{\sqrt{2}}}{x} - \frac{\frac{\frac{t}{\sqrt{2}}}{2}}{x \cdot x}\right) + \sqrt{2} \cdot t}\\ \mathbf{elif}\;t \le 4.169836755076731 \cdot 10^{+68}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(t \cdot t + \ell \cdot \frac{\ell}{x}\right) + \frac{4}{x} \cdot \left(t \cdot t\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{\frac{t}{\sqrt{2}}}{x} - \frac{\frac{\frac{t}{\sqrt{2}}}{2}}{x \cdot x}\right) + \sqrt{2} \cdot t}\\ \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 -4.4981693604397794 \cdot 10^{-29}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{2}{x \cdot x} \cdot \frac{\frac{t}{\sqrt{2}}}{2} - \frac{2 \cdot \frac{t}{\sqrt{2}}}{x}\right) - \sqrt{2} \cdot t}\\

\mathbf{elif}\;t \le 1.0624147501299982 \cdot 10^{-249}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(t \cdot t + \ell \cdot \frac{\ell}{x}\right) + \frac{4}{x} \cdot \left(t \cdot t\right)}}\\

\mathbf{elif}\;t \le 1.5173692864293495 \cdot 10^{-227}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{\frac{t}{\sqrt{2}}}{x} - \frac{\frac{\frac{t}{\sqrt{2}}}{2}}{x \cdot x}\right) + \sqrt{2} \cdot t}\\

\mathbf{elif}\;t \le 4.169836755076731 \cdot 10^{+68}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(t \cdot t + \ell \cdot \frac{\ell}{x}\right) + \frac{4}{x} \cdot \left(t \cdot t\right)}}\\

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

\end{array}
double f(double x, double l, double t) {
        double r1130129 = 2.0;
        double r1130130 = sqrt(r1130129);
        double r1130131 = t;
        double r1130132 = r1130130 * r1130131;
        double r1130133 = x;
        double r1130134 = 1.0;
        double r1130135 = r1130133 + r1130134;
        double r1130136 = r1130133 - r1130134;
        double r1130137 = r1130135 / r1130136;
        double r1130138 = l;
        double r1130139 = r1130138 * r1130138;
        double r1130140 = r1130131 * r1130131;
        double r1130141 = r1130129 * r1130140;
        double r1130142 = r1130139 + r1130141;
        double r1130143 = r1130137 * r1130142;
        double r1130144 = r1130143 - r1130139;
        double r1130145 = sqrt(r1130144);
        double r1130146 = r1130132 / r1130145;
        return r1130146;
}

double f(double x, double l, double t) {
        double r1130147 = t;
        double r1130148 = -4.4981693604397794e-29;
        bool r1130149 = r1130147 <= r1130148;
        double r1130150 = 2.0;
        double r1130151 = sqrt(r1130150);
        double r1130152 = r1130151 * r1130147;
        double r1130153 = x;
        double r1130154 = r1130153 * r1130153;
        double r1130155 = r1130150 / r1130154;
        double r1130156 = r1130147 / r1130151;
        double r1130157 = r1130156 / r1130150;
        double r1130158 = r1130155 * r1130157;
        double r1130159 = r1130150 * r1130156;
        double r1130160 = r1130159 / r1130153;
        double r1130161 = r1130158 - r1130160;
        double r1130162 = r1130161 - r1130152;
        double r1130163 = r1130152 / r1130162;
        double r1130164 = 1.0624147501299982e-249;
        bool r1130165 = r1130147 <= r1130164;
        double r1130166 = r1130147 * r1130147;
        double r1130167 = l;
        double r1130168 = r1130167 / r1130153;
        double r1130169 = r1130167 * r1130168;
        double r1130170 = r1130166 + r1130169;
        double r1130171 = r1130150 * r1130170;
        double r1130172 = 4.0;
        double r1130173 = r1130172 / r1130153;
        double r1130174 = r1130173 * r1130166;
        double r1130175 = r1130171 + r1130174;
        double r1130176 = sqrt(r1130175);
        double r1130177 = r1130152 / r1130176;
        double r1130178 = 1.5173692864293495e-227;
        bool r1130179 = r1130147 <= r1130178;
        double r1130180 = r1130156 / r1130153;
        double r1130181 = r1130157 / r1130154;
        double r1130182 = r1130180 - r1130181;
        double r1130183 = r1130150 * r1130182;
        double r1130184 = r1130183 + r1130152;
        double r1130185 = r1130152 / r1130184;
        double r1130186 = 4.169836755076731e+68;
        bool r1130187 = r1130147 <= r1130186;
        double r1130188 = r1130187 ? r1130177 : r1130185;
        double r1130189 = r1130179 ? r1130185 : r1130188;
        double r1130190 = r1130165 ? r1130177 : r1130189;
        double r1130191 = r1130149 ? r1130163 : r1130190;
        return r1130191;
}

Error

Bits error versus x

Bits error versus l

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 3 regimes
  2. if t < -4.4981693604397794e-29

    1. Initial program 40.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 36.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. Simplified33.6

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\frac{4}{x} \cdot \left(t \cdot t\right) + 2 \cdot \left(\frac{\ell}{\frac{x}{\ell}} + t \cdot t\right)}}}\]
    4. 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(t \cdot \sqrt{2} + 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}}\]
    5. Simplified6.5

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

    if -4.4981693604397794e-29 < t < 1.0624147501299982e-249 or 1.5173692864293495e-227 < t < 4.169836755076731e+68

    1. Initial program 40.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 17.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. Simplified13.9

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

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

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

    if 1.0624147501299982e-249 < t < 1.5173692864293495e-227 or 4.169836755076731e+68 < t

    1. Initial program 47.7

      \[\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 44.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. Simplified43.1

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{4}{x} \cdot \left(t \cdot t\right) + 2 \cdot \color{blue}{\left(\frac{\ell}{x} \cdot \ell + t \cdot t\right)}}}\]
    6. 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) - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}}}\]
    7. Simplified5.7

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -4.4981693604397794 \cdot 10^{-29}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{2}{x \cdot x} \cdot \frac{\frac{t}{\sqrt{2}}}{2} - \frac{2 \cdot \frac{t}{\sqrt{2}}}{x}\right) - \sqrt{2} \cdot t}\\ \mathbf{elif}\;t \le 1.0624147501299982 \cdot 10^{-249}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(t \cdot t + \ell \cdot \frac{\ell}{x}\right) + \frac{4}{x} \cdot \left(t \cdot t\right)}}\\ \mathbf{elif}\;t \le 1.5173692864293495 \cdot 10^{-227}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{\frac{t}{\sqrt{2}}}{x} - \frac{\frac{\frac{t}{\sqrt{2}}}{2}}{x \cdot x}\right) + \sqrt{2} \cdot t}\\ \mathbf{elif}\;t \le 4.169836755076731 \cdot 10^{+68}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(t \cdot t + \ell \cdot \frac{\ell}{x}\right) + \frac{4}{x} \cdot \left(t \cdot t\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{\frac{t}{\sqrt{2}}}{x} - \frac{\frac{\frac{t}{\sqrt{2}}}{2}}{x \cdot x}\right) + \sqrt{2} \cdot t}\\ \end{array}\]

Reproduce

herbie shell --seed 2019142 
(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)))))