Average Error: 29.7 → 29.7
Time: 18.5s
Precision: 64
Internal Precision: 1408
\[\sqrt{x + 1} - \sqrt{x}\]
\[\left|\sqrt[3]{1 + x}\right| \cdot \sqrt{\sqrt[3]{\sqrt{x + 1}} \cdot \sqrt[3]{\sqrt{x + 1}}} - \sqrt{x}\]

Error

Bits error versus x

Target

Original29.7
Target0.2
Herbie29.7
\[\frac{1}{\sqrt{x + 1} + \sqrt{x}}\]

Derivation

  1. Initial program 29.7

    \[\sqrt{x + 1} - \sqrt{x}\]
  2. Using strategy rm
  3. Applied add-cube-cbrt29.7

    \[\leadsto \sqrt{\color{blue}{\left(\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}\right) \cdot \sqrt[3]{x + 1}}} - \sqrt{x}\]
  4. Applied sqrt-prod29.7

    \[\leadsto \color{blue}{\sqrt{\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}} \cdot \sqrt{\sqrt[3]{x + 1}}} - \sqrt{x}\]
  5. Applied simplify29.7

    \[\leadsto \color{blue}{\left|\sqrt[3]{1 + x}\right|} \cdot \sqrt{\sqrt[3]{x + 1}} - \sqrt{x}\]
  6. Using strategy rm
  7. Applied add-sqr-sqrt29.7

    \[\leadsto \left|\sqrt[3]{1 + x}\right| \cdot \sqrt{\sqrt[3]{\color{blue}{\sqrt{x + 1} \cdot \sqrt{x + 1}}}} - \sqrt{x}\]
  8. Applied cbrt-prod29.7

    \[\leadsto \left|\sqrt[3]{1 + x}\right| \cdot \sqrt{\color{blue}{\sqrt[3]{\sqrt{x + 1}} \cdot \sqrt[3]{\sqrt{x + 1}}}} - \sqrt{x}\]

Runtime

Time bar (total: 18.5s)Debug logProfile

herbie shell --seed '#(1070355188 2193211668 3977393919 3454156579 3755371326 1656365382)' 
(FPCore (x)
  :name "2sqrt (example 3.1)"

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

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