Average Error: 29.9 → 0.3
Time: 17.9s
Precision: 64
Internal Precision: 1344
\[\sqrt{x + 1} - \sqrt{x}\]
\[\frac{1}{\left|\sqrt[3]{1 + x}\right| \cdot \sqrt{\sqrt[3]{x + 1}} + \sqrt{x}}\]

Error

Bits error versus x

Target

Original29.9
Target0.2
Herbie0.3
\[\frac{1}{\sqrt{x + 1} + \sqrt{x}}\]

Derivation

  1. Initial program 29.9

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

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

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

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

    \[\leadsto \frac{1}{\color{blue}{\sqrt{\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}} \cdot \sqrt{\sqrt[3]{x + 1}}} + \sqrt{x}}\]
  8. Applied simplify0.3

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

Runtime

Time bar (total: 17.9s)Debug logProfile

herbie shell --seed '#(1071948828 1180510430 2986424009 997076509 406109801 420189285)' 
(FPCore (x)
  :name "2sqrt (example 3.1)"

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

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