Average Error: 43.3 → 10.6
Time: 27.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 -8.435929301784521604503627472201569663835 \cdot 10^{106}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{-\left(\frac{t}{x} \cdot \frac{2}{\sqrt{2}} + \sqrt{2} \cdot t\right)}\\ \mathbf{elif}\;t \le -8.68838282607017033593451153364695886961 \cdot 10^{-163}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\left(t \cdot t + \frac{\ell}{\frac{x}{\ell}}\right) \cdot 2 + \frac{4}{\frac{x}{t \cdot t}}}}\\ \mathbf{elif}\;t \le -1.619144312720762822244529648017528882505 \cdot 10^{-287}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{-\left(\frac{t}{x} \cdot \frac{2}{\sqrt{2}} + \sqrt{2} \cdot t\right)}\\ \mathbf{elif}\;t \le 4.008879664456036295439864906185096395333 \cdot 10^{-293} \lor \neg \left(t \le 8.463507043182295426017842152139754327429 \cdot 10^{-160}\right) \land t \le 730958659336468015611904:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\left(t \cdot t + \frac{\ell}{\frac{x}{\ell}}\right) \cdot 2 + \frac{4}{\frac{x}{t \cdot t}}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{t}{x} \cdot \frac{2}{\sqrt{2}} + \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 -8.435929301784521604503627472201569663835 \cdot 10^{106}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{-\left(\frac{t}{x} \cdot \frac{2}{\sqrt{2}} + \sqrt{2} \cdot t\right)}\\

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

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

\mathbf{elif}\;t \le 4.008879664456036295439864906185096395333 \cdot 10^{-293} \lor \neg \left(t \le 8.463507043182295426017842152139754327429 \cdot 10^{-160}\right) \land t \le 730958659336468015611904:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\left(t \cdot t + \frac{\ell}{\frac{x}{\ell}}\right) \cdot 2 + \frac{4}{\frac{x}{t \cdot t}}}}\\

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

\end{array}
double f(double x, double l, double t) {
        double r45700 = 2.0;
        double r45701 = sqrt(r45700);
        double r45702 = t;
        double r45703 = r45701 * r45702;
        double r45704 = x;
        double r45705 = 1.0;
        double r45706 = r45704 + r45705;
        double r45707 = r45704 - r45705;
        double r45708 = r45706 / r45707;
        double r45709 = l;
        double r45710 = r45709 * r45709;
        double r45711 = r45702 * r45702;
        double r45712 = r45700 * r45711;
        double r45713 = r45710 + r45712;
        double r45714 = r45708 * r45713;
        double r45715 = r45714 - r45710;
        double r45716 = sqrt(r45715);
        double r45717 = r45703 / r45716;
        return r45717;
}

double f(double x, double l, double t) {
        double r45718 = t;
        double r45719 = -8.435929301784522e+106;
        bool r45720 = r45718 <= r45719;
        double r45721 = 2.0;
        double r45722 = sqrt(r45721);
        double r45723 = r45722 * r45718;
        double r45724 = x;
        double r45725 = r45718 / r45724;
        double r45726 = r45721 / r45722;
        double r45727 = r45725 * r45726;
        double r45728 = r45727 + r45723;
        double r45729 = -r45728;
        double r45730 = r45723 / r45729;
        double r45731 = -8.68838282607017e-163;
        bool r45732 = r45718 <= r45731;
        double r45733 = r45718 * r45718;
        double r45734 = l;
        double r45735 = r45724 / r45734;
        double r45736 = r45734 / r45735;
        double r45737 = r45733 + r45736;
        double r45738 = r45737 * r45721;
        double r45739 = 4.0;
        double r45740 = r45724 / r45733;
        double r45741 = r45739 / r45740;
        double r45742 = r45738 + r45741;
        double r45743 = sqrt(r45742);
        double r45744 = r45723 / r45743;
        double r45745 = -1.6191443127207628e-287;
        bool r45746 = r45718 <= r45745;
        double r45747 = 4.0088796644560363e-293;
        bool r45748 = r45718 <= r45747;
        double r45749 = 8.463507043182295e-160;
        bool r45750 = r45718 <= r45749;
        double r45751 = !r45750;
        double r45752 = 7.30958659336468e+23;
        bool r45753 = r45718 <= r45752;
        bool r45754 = r45751 && r45753;
        bool r45755 = r45748 || r45754;
        double r45756 = r45723 / r45728;
        double r45757 = r45755 ? r45744 : r45756;
        double r45758 = r45746 ? r45730 : r45757;
        double r45759 = r45732 ? r45744 : r45758;
        double r45760 = r45720 ? r45730 : r45759;
        return r45760;
}

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 < -8.435929301784522e+106 or -8.68838282607017e-163 < t < -1.6191443127207628e-287

    1. Initial program 55.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 46.0

      \[\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. Simplified46.0

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

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

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

    if -8.435929301784522e+106 < t < -8.68838282607017e-163 or -1.6191443127207628e-287 < t < 4.0088796644560363e-293 or 8.463507043182295e-160 < t < 7.30958659336468e+23

    1. Initial program 31.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 11.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. Simplified11.7

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

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

    if 4.0088796644560363e-293 < t < 8.463507043182295e-160 or 7.30958659336468e+23 < t

    1. Initial program 47.2

      \[\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 38.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. Simplified38.3

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{t \cdot \sqrt{2} + \frac{2}{\sqrt{2}} \cdot \frac{t}{x}}}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification10.6

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -8.435929301784521604503627472201569663835 \cdot 10^{106}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{-\left(\frac{t}{x} \cdot \frac{2}{\sqrt{2}} + \sqrt{2} \cdot t\right)}\\ \mathbf{elif}\;t \le -8.68838282607017033593451153364695886961 \cdot 10^{-163}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\left(t \cdot t + \frac{\ell}{\frac{x}{\ell}}\right) \cdot 2 + \frac{4}{\frac{x}{t \cdot t}}}}\\ \mathbf{elif}\;t \le -1.619144312720762822244529648017528882505 \cdot 10^{-287}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{-\left(\frac{t}{x} \cdot \frac{2}{\sqrt{2}} + \sqrt{2} \cdot t\right)}\\ \mathbf{elif}\;t \le 4.008879664456036295439864906185096395333 \cdot 10^{-293} \lor \neg \left(t \le 8.463507043182295426017842152139754327429 \cdot 10^{-160}\right) \land t \le 730958659336468015611904:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\left(t \cdot t + \frac{\ell}{\frac{x}{\ell}}\right) \cdot 2 + \frac{4}{\frac{x}{t \cdot t}}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{t}{x} \cdot \frac{2}{\sqrt{2}} + \sqrt{2} \cdot t}\\ \end{array}\]

Reproduce

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