Average Error: 43.1 → 9.8
Time: 8.2s
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 -2.0889904105457687 \cdot 10^{+63}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{2 \cdot \left(\frac{t}{x \cdot \left(x \cdot \left(2 \cdot \sqrt{2}\right)\right)} - \frac{t}{\sqrt{2} \cdot x}\right) - t \cdot \sqrt{2}}\\ \mathbf{elif}\;t \leq 3.219152109280772 \cdot 10^{-204} \lor \neg \left(t \leq 9.737845307435373 \cdot 10^{-165}\right) \land t \leq 4.633595256269455 \cdot 10^{+54}:\\ \;\;\;\;\frac{\left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right) \cdot \left(t \cdot \sqrt[3]{\sqrt{2}}\right)}{\sqrt{4 \cdot \frac{t}{\frac{x}{t}} + 2 \cdot \left(t \cdot t + \frac{\ell}{\frac{x}{\ell}}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{t \cdot \sqrt{2} + \left(2 \cdot \frac{t}{\sqrt{2} \cdot x} + \frac{t}{x \cdot x} \cdot \left(\frac{2}{\sqrt{2}} - \frac{2}{2 \cdot \sqrt{2}}\right)\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 \leq -2.0889904105457687 \cdot 10^{+63}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{2 \cdot \left(\frac{t}{x \cdot \left(x \cdot \left(2 \cdot \sqrt{2}\right)\right)} - \frac{t}{\sqrt{2} \cdot x}\right) - t \cdot \sqrt{2}}\\

\mathbf{elif}\;t \leq 3.219152109280772 \cdot 10^{-204} \lor \neg \left(t \leq 9.737845307435373 \cdot 10^{-165}\right) \land t \leq 4.633595256269455 \cdot 10^{+54}:\\
\;\;\;\;\frac{\left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right) \cdot \left(t \cdot \sqrt[3]{\sqrt{2}}\right)}{\sqrt{4 \cdot \frac{t}{\frac{x}{t}} + 2 \cdot \left(t \cdot t + \frac{\ell}{\frac{x}{\ell}}\right)}}\\

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

\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 -2.0889904105457687e+63)
   (/
    (* t (sqrt 2.0))
    (-
     (* 2.0 (- (/ t (* x (* x (* 2.0 (sqrt 2.0))))) (/ t (* (sqrt 2.0) x))))
     (* t (sqrt 2.0))))
   (if (or (<= t 3.219152109280772e-204)
           (and (not (<= t 9.737845307435373e-165))
                (<= t 4.633595256269455e+54)))
     (/
      (* (* (cbrt (sqrt 2.0)) (cbrt (sqrt 2.0))) (* t (cbrt (sqrt 2.0))))
      (sqrt (+ (* 4.0 (/ t (/ x t))) (* 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))
         (- (/ 2.0 (sqrt 2.0)) (/ 2.0 (* 2.0 (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 <= -2.0889904105457687e+63)) {
		tmp = (((double) (t * ((double) sqrt(2.0)))) / ((double) (((double) (2.0 * ((double) ((t / ((double) (x * ((double) (x * ((double) (2.0 * ((double) sqrt(2.0))))))))) - (t / ((double) (((double) sqrt(2.0)) * x))))))) - ((double) (t * ((double) sqrt(2.0)))))));
	} else {
		double tmp_1;
		if (((t <= 3.219152109280772e-204) || (!(t <= 9.737845307435373e-165) && (t <= 4.633595256269455e+54)))) {
			tmp_1 = (((double) (((double) (((double) cbrt(((double) sqrt(2.0)))) * ((double) cbrt(((double) sqrt(2.0)))))) * ((double) (t * ((double) cbrt(((double) sqrt(2.0)))))))) / ((double) sqrt(((double) (((double) (4.0 * (t / (x / t)))) + ((double) (2.0 * ((double) (((double) (t * t)) + (l / (x / l)))))))))));
		} else {
			tmp_1 = (((double) (t * ((double) sqrt(2.0)))) / ((double) (((double) (t * ((double) sqrt(2.0)))) + ((double) (((double) (2.0 * (t / ((double) (((double) sqrt(2.0)) * x))))) + ((double) ((t / ((double) (x * x))) * ((double) ((2.0 / ((double) sqrt(2.0))) - (2.0 / ((double) (2.0 * ((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 < -2.0889904105457687e63

    1. Initial program Error: 45.8 bits

      \[\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 Error: 44.8 bits

      \[\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. SimplifiedError: 42.4 bits

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

      \[\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)}}\]
    5. SimplifiedError: 3.9 bits

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

    if -2.0889904105457687e63 < t < 3.21915210928077224e-204 or 9.7378453074353731e-165 < t < 4.63359525626945472e54

    1. Initial program Error: 39.2 bits

      \[\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 Error: 17.7 bits

      \[\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. SimplifiedError: 14.2 bits

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{4 \cdot \frac{t}{\frac{x}{t}} + 2 \cdot \left(t \cdot t + \frac{\ell}{\frac{x}{\ell}}\right)}}}\]
    4. Using strategy rm
    5. Applied add-cube-cbrtError: 14.2 bits

      \[\leadsto \frac{\color{blue}{\left(\left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right) \cdot \sqrt[3]{\sqrt{2}}\right)} \cdot t}{\sqrt{4 \cdot \frac{t}{\frac{x}{t}} + 2 \cdot \left(t \cdot t + \frac{\ell}{\frac{x}{\ell}}\right)}}\]
    6. Applied associate-*l*Error: 14.2 bits

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

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

    if 3.21915210928077224e-204 < t < 9.7378453074353731e-165 or 4.63359525626945472e54 < t

    1. Initial program Error: 47.7 bits

      \[\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 Error: 6.8 bits

      \[\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. SimplifiedError: 6.8 bits

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.0889904105457687 \cdot 10^{+63}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{2 \cdot \left(\frac{t}{x \cdot \left(x \cdot \left(2 \cdot \sqrt{2}\right)\right)} - \frac{t}{\sqrt{2} \cdot x}\right) - t \cdot \sqrt{2}}\\ \mathbf{elif}\;t \leq 3.219152109280772 \cdot 10^{-204} \lor \neg \left(t \leq 9.737845307435373 \cdot 10^{-165}\right) \land t \leq 4.633595256269455 \cdot 10^{+54}:\\ \;\;\;\;\frac{\left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right) \cdot \left(t \cdot \sqrt[3]{\sqrt{2}}\right)}{\sqrt{4 \cdot \frac{t}{\frac{x}{t}} + 2 \cdot \left(t \cdot t + \frac{\ell}{\frac{x}{\ell}}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{t \cdot \sqrt{2} + \left(2 \cdot \frac{t}{\sqrt{2} \cdot x} + \frac{t}{x \cdot x} \cdot \left(\frac{2}{\sqrt{2}} - \frac{2}{2 \cdot \sqrt{2}}\right)\right)}\\ \end{array}\]

Reproduce

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