Average Error: 29.8 → 29.8
Time: 6.7s
Precision: 64
Internal Precision: 1344
\[\sqrt{x + 2} - \sqrt{x}\]
\[\left(-\sqrt{x}\right) + \sqrt{x + 2}\]

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 + 2} - \sqrt{x}\]
  2. Initial simplification29.8

    \[\leadsto \sqrt{2 + x} - \sqrt{x}\]
  3. Using strategy rm
  4. Applied sub-neg29.8

    \[\leadsto \color{blue}{\sqrt{2 + x} + \left(-\sqrt{x}\right)}\]
  5. Final simplification29.8

    \[\leadsto \left(-\sqrt{x}\right) + \sqrt{x + 2}\]

Runtime

Time bar (total: 6.7s)Debug log

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