Average Error: 0.0 → 0.0
Time: 8.3s
Precision: 64
\[\sqrt{1 + x} + \sqrt{x}\]
\[\sqrt{1 + x} + \sqrt{x}\]
\sqrt{1 + x} + \sqrt{x}
\sqrt{1 + x} + \sqrt{x}
double f(double x) {
        double r1959998 = 1.0;
        double r1959999 = x;
        double r1960000 = r1959998 + r1959999;
        double r1960001 = sqrt(r1960000);
        double r1960002 = sqrt(r1959999);
        double r1960003 = r1960001 + r1960002;
        return r1960003;
}

double f(double x) {
        double r1960004 = 1.0;
        double r1960005 = x;
        double r1960006 = r1960004 + r1960005;
        double r1960007 = sqrt(r1960006);
        double r1960008 = sqrt(r1960005);
        double r1960009 = r1960007 + r1960008;
        return r1960009;
}

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

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

Reproduce

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