Input Error: 20.1b
Output Error: 0.7b
Time: 18.2s
Precision: 64b
Ground Truth: 128b
\[\frac{1}{\sqrt{x}} - \frac{1}{\sqrt{x + 1}}\]
\[\frac{1}{\left(1 + x\right) \cdot \left(\frac{x}{\sqrt{1 + x}} + \frac{x}{\sqrt{x}}\right)}\]

Error

Bits error versus x

Derivation

  1. Initial program 20.1b

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

    \[\leadsto \color{blue}{\frac{{\left(\frac{1}{\sqrt{x}}\right)}^2 - {\left(\frac{1}{\sqrt{x + 1}}\right)}^2}{\frac{1}{\sqrt{x}} + \frac{1}{\sqrt{x + 1}}}}\]
  4. Applied simplify 20.1b

    \[\leadsto \frac{\color{blue}{\frac{1}{x} - \frac{1}{1 + x}}}{\frac{1}{\sqrt{x}} + \frac{1}{\sqrt{x + 1}}}\]
  5. Using strategy rm
  6. Applied frac-sub 19.5b

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

    \[\leadsto \frac{\frac{\color{blue}{1}}{x \cdot \left(1 + x\right)}}{\frac{1}{\sqrt{x}} + \frac{1}{\sqrt{x + 1}}}\]
  8. Using strategy rm
  9. Applied associate-/l/ 5.7b

    \[\leadsto \color{blue}{\frac{1}{\left(\frac{1}{\sqrt{x}} + \frac{1}{\sqrt{x + 1}}\right) \cdot \left(x \cdot \left(1 + x\right)\right)}}\]
  10. Applied simplify 0.7b

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

Runtime

Total time: 18.2s Debug log

herbie --seed '#(1790247807 228500556 3877068970 3669690141 81016518 3738128681)'
(FPCore (x)
  :name "NMSE example 3.6"
  
  :target
  (/ 1 (+ (* (+ x 1) (sqrt x)) (* x (sqrt (+ x 1)))))(- (/ 1 (sqrt x)) (/ 1 (sqrt (+ x 1)))))