Average Error: 42.8 → 9.2
Time: 6.3s
Precision: binary64
\[\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 \leq -1.8858110143047957 \cdot 10^{+97}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\frac{\frac{t}{x \cdot x}}{\sqrt{2}} - \left(t \cdot \sqrt{2} + 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}\\ \mathbf{elif}\;t \leq 2.031254098614039 \cdot 10^{-206} \lor \neg \left(t \leq 1.0996899265120313 \cdot 10^{-176}\right) \land t \leq 1.7102207910196578 \cdot 10^{+51}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{4 \cdot \frac{t \cdot t}{x} + 2 \cdot \left(t \cdot t + \frac{\ell}{\frac{x}{\ell}}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\left(t \cdot \sqrt{2} + 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right) - \frac{\frac{t}{x \cdot x}}{\sqrt{2}}}\\ \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 \leq -1.8858110143047957 \cdot 10^{+97}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\frac{\frac{t}{x \cdot x}}{\sqrt{2}} - \left(t \cdot \sqrt{2} + 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}\\

\mathbf{elif}\;t \leq 2.031254098614039 \cdot 10^{-206} \lor \neg \left(t \leq 1.0996899265120313 \cdot 10^{-176}\right) \land t \leq 1.7102207910196578 \cdot 10^{+51}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{4 \cdot \frac{t \cdot t}{x} + 2 \cdot \left(t \cdot t + \frac{\ell}{\frac{x}{\ell}}\right)}}\\

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

\end{array}
(FPCore (x l t)
 :precision binary64
 (/
  (* (sqrt 2.0) t)
  (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
(FPCore (x l t)
 :precision binary64
 (if (<= t -1.8858110143047957e+97)
   (/
    (* t (sqrt 2.0))
    (-
     (/ (/ t (* x x)) (sqrt 2.0))
     (+ (* t (sqrt 2.0)) (* 2.0 (/ t (* (sqrt 2.0) x))))))
   (if (or (<= t 2.031254098614039e-206)
           (and (not (<= t 1.0996899265120313e-176))
                (<= t 1.7102207910196578e+51)))
     (/
      (* t (sqrt 2.0))
      (sqrt (+ (* 4.0 (/ (* t t) x)) (* 2.0 (+ (* t t) (/ l (/ x l)))))))
     (/
      (* t (sqrt 2.0))
      (-
       (+ (* t (sqrt 2.0)) (* 2.0 (/ t (* (sqrt 2.0) x))))
       (/ (/ t (* x x)) (sqrt 2.0)))))))
double code(double x, double l, double t) {
	return (((double) (((double) sqrt(2.0)) * t)) / ((double) sqrt(((double) (((double) ((((double) (x + 1.0)) / ((double) (x - 1.0))) * ((double) (((double) (l * l)) + ((double) (2.0 * ((double) (t * t)))))))) - ((double) (l * l)))))));
}
double code(double x, double l, double t) {
	double tmp;
	if ((t <= -1.8858110143047957e+97)) {
		tmp = (((double) (t * ((double) sqrt(2.0)))) / ((double) (((t / ((double) (x * x))) / ((double) sqrt(2.0))) - ((double) (((double) (t * ((double) sqrt(2.0)))) + ((double) (2.0 * (t / ((double) (((double) sqrt(2.0)) * x))))))))));
	} else {
		double tmp_1;
		if (((t <= 2.031254098614039e-206) || (!(t <= 1.0996899265120313e-176) && (t <= 1.7102207910196578e+51)))) {
			tmp_1 = (((double) (t * ((double) sqrt(2.0)))) / ((double) sqrt(((double) (((double) (4.0 * (((double) (t * t)) / x))) + ((double) (2.0 * ((double) (((double) (t * t)) + (l / (x / l)))))))))));
		} else {
			tmp_1 = (((double) (t * ((double) sqrt(2.0)))) / ((double) (((double) (((double) (t * ((double) sqrt(2.0)))) + ((double) (2.0 * (t / ((double) (((double) sqrt(2.0)) * x))))))) - ((t / ((double) (x * x))) / ((double) sqrt(2.0))))));
		}
		tmp = tmp_1;
	}
	return tmp;
}

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 < -1.8858110143047957e97

    1. Initial program 50.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 50.5

      \[\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. Simplified50.5

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

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

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

    if -1.8858110143047957e97 < t < 2.03125409861403898e-206 or 1.09968992651203127e-176 < t < 1.71022079101965777e51

    1. Initial program 38.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 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. Simplified17.7

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

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

    if 2.03125409861403898e-206 < t < 1.09968992651203127e-176 or 1.71022079101965777e51 < t

    1. Initial program 45.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 42.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. Simplified42.6

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.8858110143047957 \cdot 10^{+97}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\frac{\frac{t}{x \cdot x}}{\sqrt{2}} - \left(t \cdot \sqrt{2} + 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}\\ \mathbf{elif}\;t \leq 2.031254098614039 \cdot 10^{-206} \lor \neg \left(t \leq 1.0996899265120313 \cdot 10^{-176}\right) \land t \leq 1.7102207910196578 \cdot 10^{+51}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{4 \cdot \frac{t \cdot t}{x} + 2 \cdot \left(t \cdot t + \frac{\ell}{\frac{x}{\ell}}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\left(t \cdot \sqrt{2} + 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right) - \frac{\frac{t}{x \cdot x}}{\sqrt{2}}}\\ \end{array}\]

Reproduce

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