Average Error: 19.4 → 22.2
Time: 8.8s
Precision: 64
Internal Precision: 1088
\[\frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}}\]
\[\frac{1}{\sqrt{x}} - {\left(x + 1\right)}^{\frac{-1}{2}}\]

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original19.4
Target0.6
Herbie22.2
\[\frac{1}{\left(x + 1\right) \cdot \sqrt{x} + x \cdot \sqrt{x + 1}}\]

Derivation

  1. Initial program 19.4

    \[\frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}}\]
  2. Initial simplification19.4

    \[\leadsto \frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}}\]
  3. Using strategy rm
  4. Applied pow1/219.4

    \[\leadsto \frac{1}{\sqrt{x}} - \frac{1}{\color{blue}{{\left(x + 1\right)}^{\frac{1}{2}}}}\]
  5. Applied pow-flip22.2

    \[\leadsto \frac{1}{\sqrt{x}} - \color{blue}{{\left(x + 1\right)}^{\left(-\frac{1}{2}\right)}}\]
  6. Simplified22.2

    \[\leadsto \frac{1}{\sqrt{x}} - {\left(x + 1\right)}^{\color{blue}{\frac{-1}{2}}}\]
  7. Final simplification22.2

    \[\leadsto \frac{1}{\sqrt{x}} - {\left(x + 1\right)}^{\frac{-1}{2}}\]

Runtime

Time bar (total: 8.8s)Debug logProfile

herbie shell --seed 2018251 +o rules:numerics
(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)))))