Average Error: 19.7 → 19.7
Time: 20.6s
Precision: 64
Internal precision: 1152
\[\frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}}\]
\[\frac{\frac{1}{x} - \frac{1}{x + 1}}{\frac{1}{\sqrt{x}} + \frac{1}{\sqrt{x + 1}}}\]

Error

Bits error versus x

Target

Original19.7
Comparison0.6
Herbie19.7
\[ \frac{1}{\left(x + 1\right) \cdot \sqrt{x} + x \cdot \sqrt{x + 1}} \]

Derivation

  1. Initial program 19.7

    \[\frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}}\]
  2. Using strategy rm
  3. Applied flip-- 19.7

    \[\leadsto \color{blue}{\frac{\frac{1}{\sqrt{x}} \cdot \frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}} \cdot \frac{1}{\sqrt{x + 1}}}{\frac{1}{\sqrt{x}} + \frac{1}{\sqrt{x + 1}}}}\]
  4. Applied simplify 25.2

    \[\leadsto \frac{\color{blue}{\frac{\frac{1}{\sqrt{x}}}{\sqrt{x}} - \frac{1}{x + 1}}}{\frac{1}{\sqrt{x}} + \frac{1}{\sqrt{x + 1}}}\]
  5. Applied simplify 19.7

    \[\leadsto \frac{\color{blue}{\frac{1}{x}} - \frac{1}{x + 1}}{\frac{1}{\sqrt{x}} + \frac{1}{\sqrt{x + 1}}}\]
  6. Removed slow pow expressions

Runtime

Time bar (total: 20.6s) Debug logProfile

Please include this information when filing a bug report:

herbie shell --seed '#(1068028399 4028058041 2917032441 2563479541 765645300 1132738916)'
(FPCore (x)
  :name "2isqrt (example 3.6)"

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

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