Average Error: 42.4 → 11.0
Time: 33.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 -20173.47029333864:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\left(\frac{\frac{2 \cdot t}{2 \cdot \sqrt{2}}}{x \cdot x} - \frac{\frac{2 \cdot t}{\sqrt{2}}}{x \cdot x}\right) - \frac{2 \cdot t}{\sqrt{2} \cdot x}\right) - \sqrt{2} \cdot t}\\ \mathbf{elif}\;t \le 1.6599090008768233 \cdot 10^{-198}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\left(t \cdot t + \sqrt{\frac{\frac{\ell}{\sqrt[3]{x}} \cdot \frac{\ell}{\sqrt[3]{x}}}{\sqrt[3]{x}}} \cdot \sqrt{\frac{\frac{\ell}{\sqrt[3]{x}} \cdot \frac{\ell}{\sqrt[3]{x}}}{\sqrt[3]{x}}}\right) \cdot 2 + \frac{t \cdot t}{x} \cdot 4}}\\ \mathbf{elif}\;t \le 1.8036563536440024 \cdot 10^{-156}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{2} \cdot t + \frac{2 \cdot t}{\sqrt{2} \cdot x}}\\ \mathbf{elif}\;t \le 4.096733327082621 \cdot 10^{-12}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\frac{t \cdot t}{x} \cdot 4 + \left(t \cdot t + \sqrt[3]{\frac{\frac{\ell}{\sqrt[3]{x}} \cdot \frac{\ell}{\sqrt[3]{x}}}{\sqrt[3]{x}}} \cdot \left(\sqrt[3]{\frac{\frac{\ell}{\sqrt[3]{x}} \cdot \frac{\ell}{\sqrt[3]{x}}}{\sqrt[3]{x}}} \cdot \sqrt[3]{\frac{\frac{\ell}{\sqrt[3]{x}} \cdot \frac{\ell}{\sqrt[3]{x}}}{\sqrt[3]{x}}}\right)\right) \cdot 2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{2} \cdot t + \frac{2 \cdot t}{\sqrt{2} \cdot x}}\\ \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 -20173.47029333864:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\left(\frac{\frac{2 \cdot t}{2 \cdot \sqrt{2}}}{x \cdot x} - \frac{\frac{2 \cdot t}{\sqrt{2}}}{x \cdot x}\right) - \frac{2 \cdot t}{\sqrt{2} \cdot x}\right) - \sqrt{2} \cdot t}\\

\mathbf{elif}\;t \le 1.6599090008768233 \cdot 10^{-198}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\left(t \cdot t + \sqrt{\frac{\frac{\ell}{\sqrt[3]{x}} \cdot \frac{\ell}{\sqrt[3]{x}}}{\sqrt[3]{x}}} \cdot \sqrt{\frac{\frac{\ell}{\sqrt[3]{x}} \cdot \frac{\ell}{\sqrt[3]{x}}}{\sqrt[3]{x}}}\right) \cdot 2 + \frac{t \cdot t}{x} \cdot 4}}\\

\mathbf{elif}\;t \le 1.8036563536440024 \cdot 10^{-156}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{2} \cdot t + \frac{2 \cdot t}{\sqrt{2} \cdot x}}\\

\mathbf{elif}\;t \le 4.096733327082621 \cdot 10^{-12}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\frac{t \cdot t}{x} \cdot 4 + \left(t \cdot t + \sqrt[3]{\frac{\frac{\ell}{\sqrt[3]{x}} \cdot \frac{\ell}{\sqrt[3]{x}}}{\sqrt[3]{x}}} \cdot \left(\sqrt[3]{\frac{\frac{\ell}{\sqrt[3]{x}} \cdot \frac{\ell}{\sqrt[3]{x}}}{\sqrt[3]{x}}} \cdot \sqrt[3]{\frac{\frac{\ell}{\sqrt[3]{x}} \cdot \frac{\ell}{\sqrt[3]{x}}}{\sqrt[3]{x}}}\right)\right) \cdot 2}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{2} \cdot t + \frac{2 \cdot t}{\sqrt{2} \cdot x}}\\

\end{array}
double f(double x, double l, double t) {
        double r1159746 = 2.0;
        double r1159747 = sqrt(r1159746);
        double r1159748 = t;
        double r1159749 = r1159747 * r1159748;
        double r1159750 = x;
        double r1159751 = 1.0;
        double r1159752 = r1159750 + r1159751;
        double r1159753 = r1159750 - r1159751;
        double r1159754 = r1159752 / r1159753;
        double r1159755 = l;
        double r1159756 = r1159755 * r1159755;
        double r1159757 = r1159748 * r1159748;
        double r1159758 = r1159746 * r1159757;
        double r1159759 = r1159756 + r1159758;
        double r1159760 = r1159754 * r1159759;
        double r1159761 = r1159760 - r1159756;
        double r1159762 = sqrt(r1159761);
        double r1159763 = r1159749 / r1159762;
        return r1159763;
}

double f(double x, double l, double t) {
        double r1159764 = t;
        double r1159765 = -20173.47029333864;
        bool r1159766 = r1159764 <= r1159765;
        double r1159767 = 2.0;
        double r1159768 = sqrt(r1159767);
        double r1159769 = r1159768 * r1159764;
        double r1159770 = r1159767 * r1159764;
        double r1159771 = r1159767 * r1159768;
        double r1159772 = r1159770 / r1159771;
        double r1159773 = x;
        double r1159774 = r1159773 * r1159773;
        double r1159775 = r1159772 / r1159774;
        double r1159776 = r1159770 / r1159768;
        double r1159777 = r1159776 / r1159774;
        double r1159778 = r1159775 - r1159777;
        double r1159779 = r1159768 * r1159773;
        double r1159780 = r1159770 / r1159779;
        double r1159781 = r1159778 - r1159780;
        double r1159782 = r1159781 - r1159769;
        double r1159783 = r1159769 / r1159782;
        double r1159784 = 1.6599090008768233e-198;
        bool r1159785 = r1159764 <= r1159784;
        double r1159786 = r1159764 * r1159764;
        double r1159787 = l;
        double r1159788 = cbrt(r1159773);
        double r1159789 = r1159787 / r1159788;
        double r1159790 = r1159789 * r1159789;
        double r1159791 = r1159790 / r1159788;
        double r1159792 = sqrt(r1159791);
        double r1159793 = r1159792 * r1159792;
        double r1159794 = r1159786 + r1159793;
        double r1159795 = r1159794 * r1159767;
        double r1159796 = r1159786 / r1159773;
        double r1159797 = 4.0;
        double r1159798 = r1159796 * r1159797;
        double r1159799 = r1159795 + r1159798;
        double r1159800 = sqrt(r1159799);
        double r1159801 = r1159769 / r1159800;
        double r1159802 = 1.8036563536440024e-156;
        bool r1159803 = r1159764 <= r1159802;
        double r1159804 = r1159769 + r1159780;
        double r1159805 = r1159769 / r1159804;
        double r1159806 = 4.096733327082621e-12;
        bool r1159807 = r1159764 <= r1159806;
        double r1159808 = cbrt(r1159791);
        double r1159809 = r1159808 * r1159808;
        double r1159810 = r1159808 * r1159809;
        double r1159811 = r1159786 + r1159810;
        double r1159812 = r1159811 * r1159767;
        double r1159813 = r1159798 + r1159812;
        double r1159814 = sqrt(r1159813);
        double r1159815 = r1159769 / r1159814;
        double r1159816 = r1159807 ? r1159815 : r1159805;
        double r1159817 = r1159803 ? r1159805 : r1159816;
        double r1159818 = r1159785 ? r1159801 : r1159817;
        double r1159819 = r1159766 ? r1159783 : r1159818;
        return r1159819;
}

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 < -20173.47029333864

    1. Initial program 41.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 5.3

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

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

    if -20173.47029333864 < t < 1.6599090008768233e-198

    1. Initial program 48.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 22.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. Simplified22.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 add-cube-cbrt22.2

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

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

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

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

    if 1.6599090008768233e-198 < t < 1.8036563536440024e-156 or 4.096733327082621e-12 < t

    1. Initial program 41.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 37.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. Simplified37.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 add-cube-cbrt37.1

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

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{t \cdot \sqrt{2} + 2 \cdot \frac{t}{\sqrt{2} \cdot x}}}\]
    9. Simplified8.0

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{\frac{2 \cdot t}{x \cdot \sqrt{2}} + \sqrt{2} \cdot t}}\]

    if 1.8036563536440024e-156 < t < 4.096733327082621e-12

    1. Initial program 31.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 9.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. Simplified9.3

      \[\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 add-cube-cbrt9.4

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -20173.47029333864:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\left(\frac{\frac{2 \cdot t}{2 \cdot \sqrt{2}}}{x \cdot x} - \frac{\frac{2 \cdot t}{\sqrt{2}}}{x \cdot x}\right) - \frac{2 \cdot t}{\sqrt{2} \cdot x}\right) - \sqrt{2} \cdot t}\\ \mathbf{elif}\;t \le 1.6599090008768233 \cdot 10^{-198}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\left(t \cdot t + \sqrt{\frac{\frac{\ell}{\sqrt[3]{x}} \cdot \frac{\ell}{\sqrt[3]{x}}}{\sqrt[3]{x}}} \cdot \sqrt{\frac{\frac{\ell}{\sqrt[3]{x}} \cdot \frac{\ell}{\sqrt[3]{x}}}{\sqrt[3]{x}}}\right) \cdot 2 + \frac{t \cdot t}{x} \cdot 4}}\\ \mathbf{elif}\;t \le 1.8036563536440024 \cdot 10^{-156}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{2} \cdot t + \frac{2 \cdot t}{\sqrt{2} \cdot x}}\\ \mathbf{elif}\;t \le 4.096733327082621 \cdot 10^{-12}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\frac{t \cdot t}{x} \cdot 4 + \left(t \cdot t + \sqrt[3]{\frac{\frac{\ell}{\sqrt[3]{x}} \cdot \frac{\ell}{\sqrt[3]{x}}}{\sqrt[3]{x}}} \cdot \left(\sqrt[3]{\frac{\frac{\ell}{\sqrt[3]{x}} \cdot \frac{\ell}{\sqrt[3]{x}}}{\sqrt[3]{x}}} \cdot \sqrt[3]{\frac{\frac{\ell}{\sqrt[3]{x}} \cdot \frac{\ell}{\sqrt[3]{x}}}{\sqrt[3]{x}}}\right)\right) \cdot 2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{2} \cdot t + \frac{2 \cdot t}{\sqrt{2} \cdot x}}\\ \end{array}\]

Reproduce

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