Average Error: 29.8 → 0.2
Time: 15.0s
Precision: 64
Internal Precision: 1344
\[\sqrt{1 + x} - \sqrt{x}\]
\[\frac{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

Derivation

  1. Initial program 29.8

    \[\sqrt{1 + x} - \sqrt{x}\]
  2. Initial simplification29.8

    \[\leadsto \sqrt{x + 1} - \sqrt{x}\]
  3. Using strategy rm
  4. Applied flip--29.6

    \[\leadsto \color{blue}{\frac{\sqrt{x + 1} \cdot \sqrt{x + 1} - \sqrt{x} \cdot \sqrt{x}}{\sqrt{x + 1} + \sqrt{x}}}\]
  5. Using strategy rm
  6. Applied *-un-lft-identity29.6

    \[\leadsto \frac{\sqrt{x + 1} \cdot \sqrt{x + 1} - \sqrt{x} \cdot \sqrt{x}}{\color{blue}{1 \cdot \left(\sqrt{x + 1} + \sqrt{x}\right)}}\]
  7. Applied *-un-lft-identity29.6

    \[\leadsto \frac{\color{blue}{1 \cdot \left(\sqrt{x + 1} \cdot \sqrt{x + 1} - \sqrt{x} \cdot \sqrt{x}\right)}}{1 \cdot \left(\sqrt{x + 1} + \sqrt{x}\right)}\]
  8. Applied times-frac29.6

    \[\leadsto \color{blue}{\frac{1}{1} \cdot \frac{\sqrt{x + 1} \cdot \sqrt{x + 1} - \sqrt{x} \cdot \sqrt{x}}{\sqrt{x + 1} + \sqrt{x}}}\]
  9. Simplified29.6

    \[\leadsto \color{blue}{1} \cdot \frac{\sqrt{x + 1} \cdot \sqrt{x + 1} - \sqrt{x} \cdot \sqrt{x}}{\sqrt{x + 1} + \sqrt{x}}\]
  10. Simplified0.2

    \[\leadsto 1 \cdot \color{blue}{\frac{1}{\sqrt{x} + \sqrt{1 + x}}}\]
  11. Final simplification0.2

    \[\leadsto \frac{1}{\sqrt{x} + \sqrt{x + 1}}\]

Runtime

Time bar (total: 15.0s)Debug log

herbie shell --seed '#(2775764126 3555076145 3898259844 1891440260 2599947619 1948460636)' 
(FPCore (x)
  :name "sqrt(1+x)-sqrt(x)"
  (- (sqrt (+ 1 x)) (sqrt x)))