Average Error: 20.4 → 20.4
Time: 13.1s
Precision: 64
Internal Precision: 1088
\[\frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}}\]
\[\frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}}\]

Error

Bits error versus x

Target

Original20.4
Target0.7
Herbie20.4
\[\frac{1}{\left(x + 1\right) \cdot \sqrt{x} + x \cdot \sqrt{x + 1}}\]

Derivation

  1. Initial program 20.4

    \[\frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}}\]

Runtime

Time bar (total: 13.1s)Debug logProfile

herbie shell --seed '#(1072361757 3390613284 2339397988 1175251238 145061547 3101881848)' 
(FPCore (x)
  :name "2isqrt (example 3.6)"

  :herbie-target
  (/ 1 (+ (* (+ x 1) (sqrt x)) (* x (sqrt (+ x 1)))))

  (- (/ 1 (sqrt x)) (/ 1 (sqrt (+ x 1)))))