Average Error: 29.8 → 0.2
Time: 14.1s
Precision: 64
Internal Precision: 1344
\[\sqrt{X + 1} - \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{X + 1} - \sqrt{X}\]
  2. Using strategy rm
  3. 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}}}\]
  4. Using strategy rm
  5. 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)}}\]
  6. 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)}\]
  7. 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}}}\]
  8. 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}}\]
  9. Simplified0.2

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

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

Runtime

Time bar (total: 14.1s)Debug log

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