Average Error: 0.0 → 0.0
Time: 13.4s
Precision: 64
\[\sqrt{x + 1} + \sqrt{x}\]
\[\sqrt{x + 1} + \sqrt{x}\]
\sqrt{x + 1} + \sqrt{x}
\sqrt{x + 1} + \sqrt{x}
double f(double x) {
        double r36068111 = x;
        double r36068112 = 1.0;
        double r36068113 = r36068111 + r36068112;
        double r36068114 = sqrt(r36068113);
        double r36068115 = sqrt(r36068111);
        double r36068116 = r36068114 + r36068115;
        return r36068116;
}

double f(double x) {
        double r36068117 = x;
        double r36068118 = 1.0;
        double r36068119 = r36068117 + r36068118;
        double r36068120 = sqrt(r36068119);
        double r36068121 = sqrt(r36068117);
        double r36068122 = r36068120 + r36068121;
        return r36068122;
}

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

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

Reproduce

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