Average Error: 43.2 → 15.7
Time: 10.6s
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}}\]
\[\frac{\sqrt{2} \cdot t}{\sqrt{2} \cdot \left|t\right|}\]
\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}}
\frac{\sqrt{2} \cdot t}{\sqrt{2} \cdot \left|t\right|}
(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
 (/ (* (sqrt 2.0) t) (* (sqrt 2.0) (fabs t))))
double code(double x, double l, double t) {
	return (sqrt(2.0) * t) / sqrt((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l));
}
double code(double x, double l, double t) {
	return (sqrt(2.0) * t) / (sqrt(2.0) * fabs(t));
}

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. Initial program 43.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.8

    \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot {t}^{2}}}}\]
  3. Simplified38.8

    \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \left(t \cdot t\right)}}}\]
  4. Using strategy rm
  5. Applied sqrt-prod_binary64_9438.6

    \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{\sqrt{2} \cdot \sqrt{t \cdot t}}}\]
  6. Simplified15.7

    \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2} \cdot \color{blue}{\left|t\right|}}\]
  7. Final simplification15.7

    \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2} \cdot \left|t\right|}\]

Reproduce

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