Average Error: 0.0 → 0.0
Time: 7.1s
Precision: 64
\[\sqrt{x + 1} + \sqrt{1}\]
\[\sqrt{x + 1} + \sqrt{1}\]
\sqrt{x + 1} + \sqrt{1}
\sqrt{x + 1} + \sqrt{1}
double f(double x) {
        double r3618420 = x;
        double r3618421 = 1.0;
        double r3618422 = r3618420 + r3618421;
        double r3618423 = sqrt(r3618422);
        double r3618424 = sqrt(r3618421);
        double r3618425 = r3618423 + r3618424;
        return r3618425;
}

double f(double x) {
        double r3618426 = x;
        double r3618427 = 1.0;
        double r3618428 = r3618426 + r3618427;
        double r3618429 = sqrt(r3618428);
        double r3618430 = sqrt(r3618427);
        double r3618431 = r3618429 + r3618430;
        return r3618431;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[\sqrt{x + 1} + \sqrt{1}\]
  2. Final simplification0.0

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

Reproduce

herbie shell --seed 1 
(FPCore (x)
  :name "sqrt(x+1) + sqrt(1)"
  :precision binary64
  (+ (sqrt (+ x 1)) (sqrt 1)))