Average Error: 19.4 → 0.4
Time: 13.4s
Precision: 64
Internal Precision: 1088
\[\frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}}\]
\[\frac{\frac{1}{\left(\sqrt{\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}} \cdot \sqrt{x}\right) \cdot \sqrt{\sqrt[3]{x + 1}}}}{\sqrt{x} + \sqrt{x + 1}}\]

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original19.4
Target0.7
Herbie0.4
\[\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 frac-sub19.4

    \[\leadsto \color{blue}{\frac{1 \cdot \sqrt{x + 1} - \sqrt{x} \cdot 1}{\sqrt{x} \cdot \sqrt{x + 1}}}\]
  5. Simplified19.4

    \[\leadsto \frac{\color{blue}{\sqrt{x + 1} - \sqrt{x}}}{\sqrt{x} \cdot \sqrt{x + 1}}\]
  6. Using strategy rm
  7. Applied flip--19.3

    \[\leadsto \frac{\color{blue}{\frac{\sqrt{x + 1} \cdot \sqrt{x + 1} - \sqrt{x} \cdot \sqrt{x}}{\sqrt{x + 1} + \sqrt{x}}}}{\sqrt{x} \cdot \sqrt{x + 1}}\]
  8. Applied associate-/l/19.3

    \[\leadsto \color{blue}{\frac{\sqrt{x + 1} \cdot \sqrt{x + 1} - \sqrt{x} \cdot \sqrt{x}}{\left(\sqrt{x} \cdot \sqrt{x + 1}\right) \cdot \left(\sqrt{x + 1} + \sqrt{x}\right)}}\]
  9. Simplified0.8

    \[\leadsto \frac{\color{blue}{1}}{\left(\sqrt{x} \cdot \sqrt{x + 1}\right) \cdot \left(\sqrt{x + 1} + \sqrt{x}\right)}\]
  10. Using strategy rm
  11. Applied associate-/r*0.4

    \[\leadsto \color{blue}{\frac{\frac{1}{\sqrt{x} \cdot \sqrt{x + 1}}}{\sqrt{x + 1} + \sqrt{x}}}\]
  12. Using strategy rm
  13. Applied add-cube-cbrt0.5

    \[\leadsto \frac{\frac{1}{\sqrt{x} \cdot \sqrt{\color{blue}{\left(\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}\right) \cdot \sqrt[3]{x + 1}}}}}{\sqrt{x + 1} + \sqrt{x}}\]
  14. Applied sqrt-prod0.5

    \[\leadsto \frac{\frac{1}{\sqrt{x} \cdot \color{blue}{\left(\sqrt{\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}} \cdot \sqrt{\sqrt[3]{x + 1}}\right)}}}{\sqrt{x + 1} + \sqrt{x}}\]
  15. Applied associate-*r*0.4

    \[\leadsto \frac{\frac{1}{\color{blue}{\left(\sqrt{x} \cdot \sqrt{\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}}\right) \cdot \sqrt{\sqrt[3]{x + 1}}}}}{\sqrt{x + 1} + \sqrt{x}}\]
  16. Final simplification0.4

    \[\leadsto \frac{\frac{1}{\left(\sqrt{\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}} \cdot \sqrt{x}\right) \cdot \sqrt{\sqrt[3]{x + 1}}}}{\sqrt{x} + \sqrt{x + 1}}\]

Runtime

Time bar (total: 13.4s)Debug logProfile

BaselineHerbieOracleSpan%
Regimes0.40.40.00.40%
herbie shell --seed 2018297 
(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)))))