Average Error: 42.7 → 8.7
Time: 8.5s
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 -6.0190934789368676 \cdot 10^{134}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \left(2 \cdot \frac{t}{\sqrt{2} \cdot x} + t \cdot \sqrt{2}\right)}\\ \mathbf{elif}\;t \le -1.3093127471214333 \cdot 10^{-159}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{elif}\;t \le -1.00692316033768718 \cdot 10^{-226}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \left(2 \cdot \frac{t}{\sqrt{2} \cdot x} + t \cdot \sqrt{2}\right)}\\ \mathbf{elif}\;t \le 8.64736697806752824 \cdot 10^{90}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{\sqrt{2} \cdot {x}^{2}} + \frac{t}{\sqrt{2} \cdot x}\right) + \left(\sqrt{2} \cdot t - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}\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 -6.0190934789368676 \cdot 10^{134}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \left(2 \cdot \frac{t}{\sqrt{2} \cdot x} + t \cdot \sqrt{2}\right)}\\

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

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

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

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

\end{array}
double f(double x, double l, double t) {
        double r35099 = 2.0;
        double r35100 = sqrt(r35099);
        double r35101 = t;
        double r35102 = r35100 * r35101;
        double r35103 = x;
        double r35104 = 1.0;
        double r35105 = r35103 + r35104;
        double r35106 = r35103 - r35104;
        double r35107 = r35105 / r35106;
        double r35108 = l;
        double r35109 = r35108 * r35108;
        double r35110 = r35101 * r35101;
        double r35111 = r35099 * r35110;
        double r35112 = r35109 + r35111;
        double r35113 = r35107 * r35112;
        double r35114 = r35113 - r35109;
        double r35115 = sqrt(r35114);
        double r35116 = r35102 / r35115;
        return r35116;
}

double f(double x, double l, double t) {
        double r35117 = t;
        double r35118 = -6.0190934789368676e+134;
        bool r35119 = r35117 <= r35118;
        double r35120 = 2.0;
        double r35121 = sqrt(r35120);
        double r35122 = r35121 * r35117;
        double r35123 = 3.0;
        double r35124 = pow(r35121, r35123);
        double r35125 = x;
        double r35126 = 2.0;
        double r35127 = pow(r35125, r35126);
        double r35128 = r35124 * r35127;
        double r35129 = r35117 / r35128;
        double r35130 = r35120 * r35129;
        double r35131 = r35121 * r35125;
        double r35132 = r35117 / r35131;
        double r35133 = r35120 * r35132;
        double r35134 = r35117 * r35121;
        double r35135 = r35133 + r35134;
        double r35136 = r35130 - r35135;
        double r35137 = r35122 / r35136;
        double r35138 = -1.3093127471214333e-159;
        bool r35139 = r35117 <= r35138;
        double r35140 = 4.0;
        double r35141 = pow(r35117, r35126);
        double r35142 = r35141 / r35125;
        double r35143 = r35140 * r35142;
        double r35144 = l;
        double r35145 = r35144 / r35125;
        double r35146 = r35144 * r35145;
        double r35147 = r35141 + r35146;
        double r35148 = r35120 * r35147;
        double r35149 = r35143 + r35148;
        double r35150 = sqrt(r35149);
        double r35151 = r35122 / r35150;
        double r35152 = -1.0069231603376872e-226;
        bool r35153 = r35117 <= r35152;
        double r35154 = 8.647366978067528e+90;
        bool r35155 = r35117 <= r35154;
        double r35156 = r35121 * r35127;
        double r35157 = r35117 / r35156;
        double r35158 = r35157 + r35132;
        double r35159 = r35120 * r35158;
        double r35160 = r35122 - r35130;
        double r35161 = r35159 + r35160;
        double r35162 = r35122 / r35161;
        double r35163 = r35155 ? r35151 : r35162;
        double r35164 = r35153 ? r35137 : r35163;
        double r35165 = r35139 ? r35151 : r35164;
        double r35166 = r35119 ? r35137 : r35165;
        return r35166;
}

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 < -6.0190934789368676e+134 or -1.3093127471214333e-159 < t < -1.0069231603376872e-226

    1. Initial program 58.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 53.2

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

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

      \[\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} + t \cdot \sqrt{2}\right)}}\]

    if -6.0190934789368676e+134 < t < -1.3093127471214333e-159 or -1.0069231603376872e-226 < t < 8.647366978067528e+90

    1. Initial program 34.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 15.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. Simplified15.3

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\ell}^{2}}{x}\right)}}}\]
    4. Using strategy rm
    5. Applied *-un-lft-identity15.3

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\ell}^{2}}{\color{blue}{1 \cdot x}}\right)}}\]
    6. Applied add-sqr-sqrt39.7

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\color{blue}{\left(\sqrt{\ell} \cdot \sqrt{\ell}\right)}}^{2}}{1 \cdot x}\right)}}\]
    7. Applied unpow-prod-down39.7

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{\color{blue}{{\left(\sqrt{\ell}\right)}^{2} \cdot {\left(\sqrt{\ell}\right)}^{2}}}{1 \cdot x}\right)}}\]
    8. Applied times-frac37.3

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

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

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

    if 8.647366978067528e+90 < t

    1. Initial program 49.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 3.0

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -6.0190934789368676 \cdot 10^{134}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \left(2 \cdot \frac{t}{\sqrt{2} \cdot x} + t \cdot \sqrt{2}\right)}\\ \mathbf{elif}\;t \le -1.3093127471214333 \cdot 10^{-159}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{elif}\;t \le -1.00692316033768718 \cdot 10^{-226}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \left(2 \cdot \frac{t}{\sqrt{2} \cdot x} + t \cdot \sqrt{2}\right)}\\ \mathbf{elif}\;t \le 8.64736697806752824 \cdot 10^{90}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{\sqrt{2} \cdot {x}^{2}} + \frac{t}{\sqrt{2} \cdot x}\right) + \left(\sqrt{2} \cdot t - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}\right)}\\ \end{array}\]

Reproduce

herbie shell --seed 2020065 
(FPCore (x l t)
  :name "Toniolo and Linder, Equation (7)"
  :precision binary64
  (/ (* (sqrt 2) t) (sqrt (- (* (/ (+ x 1) (- x 1)) (+ (* l l) (* 2 (* t t)))) (* l l)))))