Average Error: 42.0 → 9.0
Time: 27.7s
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 -1.9121810864395621 \cdot 10^{+142}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{-\left(\sqrt{2} \cdot t + \frac{t}{x \cdot \sqrt{2}} \cdot 2\right)}\\ \mathbf{elif}\;t \le -6.488460202761919 \cdot 10^{-152}:\\ \;\;\;\;\frac{\sqrt{\sqrt{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot t\right)}{\sqrt{\frac{t \cdot t}{x} \cdot 4 + 2 \cdot \left(\frac{\ell}{\frac{x}{\ell}} + t \cdot t\right)}}\\ \mathbf{elif}\;t \le -8.653026810570713 \cdot 10^{-249}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{-\left(\sqrt{2} \cdot t + \frac{t}{x \cdot \sqrt{2}} \cdot 2\right)}\\ \mathbf{elif}\;t \le 9.75018164282627 \cdot 10^{-224}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\frac{t \cdot t}{x} \cdot 4 + 2 \cdot \left(\frac{\ell}{\frac{x}{\ell}} + t \cdot t\right)}}\\ \mathbf{elif}\;t \le 2.245304088873431 \cdot 10^{-167}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{2}{x} \cdot \frac{t}{\sqrt{2}} + \sqrt{2} \cdot t\right) - 2 \cdot \left(\frac{t}{\left(x \cdot x\right) \cdot \left(2 \cdot \sqrt{2}\right)} - \frac{\frac{t}{\sqrt{2}}}{x \cdot x}\right)}\\ \mathbf{elif}\;t \le 1.9084252591087465 \cdot 10^{+124}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\frac{t \cdot t}{x} \cdot 4 + 2 \cdot \left(\frac{\ell}{\frac{x}{\ell}} + t \cdot t\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{2}{x} \cdot \frac{t}{\sqrt{2}} + \sqrt{2} \cdot t\right) - 2 \cdot \left(\frac{t}{\left(x \cdot x\right) \cdot \left(2 \cdot \sqrt{2}\right)} - \frac{\frac{t}{\sqrt{2}}}{x \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 -1.9121810864395621 \cdot 10^{+142}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{-\left(\sqrt{2} \cdot t + \frac{t}{x \cdot \sqrt{2}} \cdot 2\right)}\\

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

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

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

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

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

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

\end{array}
double f(double x, double l, double t) {
        double r1413551 = 2.0;
        double r1413552 = sqrt(r1413551);
        double r1413553 = t;
        double r1413554 = r1413552 * r1413553;
        double r1413555 = x;
        double r1413556 = 1.0;
        double r1413557 = r1413555 + r1413556;
        double r1413558 = r1413555 - r1413556;
        double r1413559 = r1413557 / r1413558;
        double r1413560 = l;
        double r1413561 = r1413560 * r1413560;
        double r1413562 = r1413553 * r1413553;
        double r1413563 = r1413551 * r1413562;
        double r1413564 = r1413561 + r1413563;
        double r1413565 = r1413559 * r1413564;
        double r1413566 = r1413565 - r1413561;
        double r1413567 = sqrt(r1413566);
        double r1413568 = r1413554 / r1413567;
        return r1413568;
}

double f(double x, double l, double t) {
        double r1413569 = t;
        double r1413570 = -1.9121810864395621e+142;
        bool r1413571 = r1413569 <= r1413570;
        double r1413572 = 2.0;
        double r1413573 = sqrt(r1413572);
        double r1413574 = r1413573 * r1413569;
        double r1413575 = x;
        double r1413576 = r1413575 * r1413573;
        double r1413577 = r1413569 / r1413576;
        double r1413578 = r1413577 * r1413572;
        double r1413579 = r1413574 + r1413578;
        double r1413580 = -r1413579;
        double r1413581 = r1413574 / r1413580;
        double r1413582 = -6.488460202761919e-152;
        bool r1413583 = r1413569 <= r1413582;
        double r1413584 = sqrt(r1413573);
        double r1413585 = r1413584 * r1413569;
        double r1413586 = r1413584 * r1413585;
        double r1413587 = r1413569 * r1413569;
        double r1413588 = r1413587 / r1413575;
        double r1413589 = 4.0;
        double r1413590 = r1413588 * r1413589;
        double r1413591 = l;
        double r1413592 = r1413575 / r1413591;
        double r1413593 = r1413591 / r1413592;
        double r1413594 = r1413593 + r1413587;
        double r1413595 = r1413572 * r1413594;
        double r1413596 = r1413590 + r1413595;
        double r1413597 = sqrt(r1413596);
        double r1413598 = r1413586 / r1413597;
        double r1413599 = -8.653026810570713e-249;
        bool r1413600 = r1413569 <= r1413599;
        double r1413601 = 9.75018164282627e-224;
        bool r1413602 = r1413569 <= r1413601;
        double r1413603 = r1413574 / r1413597;
        double r1413604 = 2.245304088873431e-167;
        bool r1413605 = r1413569 <= r1413604;
        double r1413606 = r1413572 / r1413575;
        double r1413607 = r1413569 / r1413573;
        double r1413608 = r1413606 * r1413607;
        double r1413609 = r1413608 + r1413574;
        double r1413610 = r1413575 * r1413575;
        double r1413611 = r1413572 * r1413573;
        double r1413612 = r1413610 * r1413611;
        double r1413613 = r1413569 / r1413612;
        double r1413614 = r1413607 / r1413610;
        double r1413615 = r1413613 - r1413614;
        double r1413616 = r1413572 * r1413615;
        double r1413617 = r1413609 - r1413616;
        double r1413618 = r1413574 / r1413617;
        double r1413619 = 1.9084252591087465e+124;
        bool r1413620 = r1413569 <= r1413619;
        double r1413621 = r1413620 ? r1413603 : r1413618;
        double r1413622 = r1413605 ? r1413618 : r1413621;
        double r1413623 = r1413602 ? r1413603 : r1413622;
        double r1413624 = r1413600 ? r1413581 : r1413623;
        double r1413625 = r1413583 ? r1413598 : r1413624;
        double r1413626 = r1413571 ? r1413581 : r1413625;
        return r1413626;
}

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 4 regimes
  2. if t < -1.9121810864395621e+142 or -6.488460202761919e-152 < t < -8.653026810570713e-249

    1. Initial program 59.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 53.1

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(t \cdot t + \color{blue}{\frac{\ell}{\frac{x}{\ell}}}\right) + \frac{t \cdot t}{x} \cdot 4}}\]
    6. Using strategy rm
    7. Applied *-commutative51.6

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

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

    if -1.9121810864395621e+142 < t < -6.488460202761919e-152

    1. Initial program 22.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 9.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)}}}\]
    3. Simplified9.4

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(t \cdot t + \color{blue}{\frac{\ell}{\frac{x}{\ell}}}\right) + \frac{t \cdot t}{x} \cdot 4}}\]
    6. Using strategy rm
    7. Applied *-commutative4.1

      \[\leadsto \frac{\color{blue}{t \cdot \sqrt{2}}}{\sqrt{2 \cdot \left(t \cdot t + \frac{\ell}{\frac{x}{\ell}}\right) + \frac{t \cdot t}{x} \cdot 4}}\]
    8. Using strategy rm
    9. Applied add-sqr-sqrt4.1

      \[\leadsto \frac{t \cdot \sqrt{\color{blue}{\sqrt{2} \cdot \sqrt{2}}}}{\sqrt{2 \cdot \left(t \cdot t + \frac{\ell}{\frac{x}{\ell}}\right) + \frac{t \cdot t}{x} \cdot 4}}\]
    10. Applied sqrt-prod4.3

      \[\leadsto \frac{t \cdot \color{blue}{\left(\sqrt{\sqrt{2}} \cdot \sqrt{\sqrt{2}}\right)}}{\sqrt{2 \cdot \left(t \cdot t + \frac{\ell}{\frac{x}{\ell}}\right) + \frac{t \cdot t}{x} \cdot 4}}\]
    11. Applied associate-*r*4.2

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

    if -8.653026810570713e-249 < t < 9.75018164282627e-224 or 2.245304088873431e-167 < t < 1.9084252591087465e+124

    1. Initial program 35.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 16.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)}}}\]
    3. Simplified16.6

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(t \cdot t + \color{blue}{\frac{\ell}{\frac{x}{\ell}}}\right) + \frac{t \cdot t}{x} \cdot 4}}\]
    6. Using strategy rm
    7. Applied *-commutative12.6

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

    if 9.75018164282627e-224 < t < 2.245304088873431e-167 or 1.9084252591087465e+124 < t

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -1.9121810864395621 \cdot 10^{+142}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{-\left(\sqrt{2} \cdot t + \frac{t}{x \cdot \sqrt{2}} \cdot 2\right)}\\ \mathbf{elif}\;t \le -6.488460202761919 \cdot 10^{-152}:\\ \;\;\;\;\frac{\sqrt{\sqrt{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot t\right)}{\sqrt{\frac{t \cdot t}{x} \cdot 4 + 2 \cdot \left(\frac{\ell}{\frac{x}{\ell}} + t \cdot t\right)}}\\ \mathbf{elif}\;t \le -8.653026810570713 \cdot 10^{-249}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{-\left(\sqrt{2} \cdot t + \frac{t}{x \cdot \sqrt{2}} \cdot 2\right)}\\ \mathbf{elif}\;t \le 9.75018164282627 \cdot 10^{-224}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\frac{t \cdot t}{x} \cdot 4 + 2 \cdot \left(\frac{\ell}{\frac{x}{\ell}} + t \cdot t\right)}}\\ \mathbf{elif}\;t \le 2.245304088873431 \cdot 10^{-167}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{2}{x} \cdot \frac{t}{\sqrt{2}} + \sqrt{2} \cdot t\right) - 2 \cdot \left(\frac{t}{\left(x \cdot x\right) \cdot \left(2 \cdot \sqrt{2}\right)} - \frac{\frac{t}{\sqrt{2}}}{x \cdot x}\right)}\\ \mathbf{elif}\;t \le 1.9084252591087465 \cdot 10^{+124}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\frac{t \cdot t}{x} \cdot 4 + 2 \cdot \left(\frac{\ell}{\frac{x}{\ell}} + t \cdot t\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{2}{x} \cdot \frac{t}{\sqrt{2}} + \sqrt{2} \cdot t\right) - 2 \cdot \left(\frac{t}{\left(x \cdot x\right) \cdot \left(2 \cdot \sqrt{2}\right)} - \frac{\frac{t}{\sqrt{2}}}{x \cdot x}\right)}\\ \end{array}\]

Reproduce

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