Average Error: 20.1 → 20.1
Time: 3.9s
Precision: 64
Internal precision: 1152
\[\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.1
Comparison0.6
Herbie20.1
\[ \frac{1}{\left(x + 1\right) \cdot \sqrt{x} + x \cdot \sqrt{x + 1}} \]

Derivation

  1. Initial program 20.1

    \[\frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}}\]
  2. Removed slow pow expressions

Runtime

Time bar (total: 3.9s) Debug logProfile

Please include this information when filing a bug report:

herbie shell --seed '#(1064875752 1442698706 3150723005 1316518582 2592983078 3835530843)'
(FPCore (x)
  :name "2isqrt (example 3.6)"

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

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