Error: 19.8 → 0.7
Time: 14.2s
Precision: 64
Ground Truth: 128
\[\frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}}\]
\[\frac{\frac{1}{\sqrt{1 + x} + \sqrt{x}}}{{\left(\sqrt{\sqrt{x}} \cdot \sqrt{\sqrt{x + 1}}\right)}^2}\]

Error

Bits error versus x

Derivation

  1. Initial program 19.8

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

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

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

    \[\leadsto \frac{\color{blue}{\frac{{\left(\sqrt{1 + x}\right)}^2 - {\left(\sqrt{x}\right)}^2}{\sqrt{1 + x} + \sqrt{x}}}}{\sqrt{x} \cdot \sqrt{x + 1}}\]
  7. Applied simplify 0.4

    \[\leadsto \frac{\frac{\color{blue}{1}}{\sqrt{1 + x} + \sqrt{x}}}{\sqrt{x} \cdot \sqrt{x + 1}}\]
  8. Using strategy rm
  9. Applied add-sqr-sqrt 0.4

    \[\leadsto \frac{\frac{1}{\sqrt{1 + x} + \sqrt{x}}}{\sqrt{x} \cdot \color{blue}{{\left(\sqrt{\sqrt{x + 1}}\right)}^2}}\]
  10. Applied add-sqr-sqrt 0.7

    \[\leadsto \frac{\frac{1}{\sqrt{1 + x} + \sqrt{x}}}{\color{blue}{{\left(\sqrt{\sqrt{x}}\right)}^2} \cdot {\left(\sqrt{\sqrt{x + 1}}\right)}^2}\]
  11. Applied square-unprod 0.7

    \[\leadsto \frac{\frac{1}{\sqrt{1 + x} + \sqrt{x}}}{\color{blue}{{\left(\sqrt{\sqrt{x}} \cdot \sqrt{\sqrt{x + 1}}\right)}^2}}\]
  12. Removed slow pow expressions

Runtime

Total time: 14.2s Debug log

Please report a bug with the following info:

herbie --seed '#(3822141864 1043752065 144447817 594738019 812047525 1708818527)'
(FPCore (x)
  :name "NMSE example 3.6"
  
  :target
  (/ 1 (+ (* (+ x 1) (sqrt x)) (* x (sqrt (+ x 1)))))(- (/ 1 (sqrt x)) (/ 1 (sqrt (+ x 1)))))