Average Error: 0.0 → 0.0
Time: 9.6s
Precision: 64
\[\sqrt{x + 1} + 1\]
\[1 + \sqrt{x + 1}\]
\sqrt{x + 1} + 1
1 + \sqrt{x + 1}
double f(double x) {
        double r44108269 = x;
        double r44108270 = 1.0;
        double r44108271 = r44108269 + r44108270;
        double r44108272 = sqrt(r44108271);
        double r44108273 = r44108272 + r44108270;
        return r44108273;
}

double f(double x) {
        double r44108274 = 1.0;
        double r44108275 = x;
        double r44108276 = r44108275 + r44108274;
        double r44108277 = sqrt(r44108276);
        double r44108278 = r44108274 + r44108277;
        return r44108278;
}

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} + 1\]
  2. Final simplification0.0

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

Reproduce

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