Average Error: 0 → 0
Time: 1.4s
Precision: 64
\[\sqrt{x + 1} - \sqrt{y}\]
\[\sqrt{x + 1} - \sqrt{y}\]
\sqrt{x + 1} - \sqrt{y}
\sqrt{x + 1} - \sqrt{y}
double f(double x, double y) {
        double r1590030 = x;
        double r1590031 = 1.0;
        double r1590032 = r1590030 + r1590031;
        double r1590033 = sqrt(r1590032);
        double r1590034 = y;
        double r1590035 = sqrt(r1590034);
        double r1590036 = r1590033 - r1590035;
        return r1590036;
}

double f(double x, double y) {
        double r1590037 = x;
        double r1590038 = 1.0;
        double r1590039 = r1590037 + r1590038;
        double r1590040 = sqrt(r1590039);
        double r1590041 = y;
        double r1590042 = sqrt(r1590041);
        double r1590043 = r1590040 - r1590042;
        return r1590043;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0

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

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

Reproduce

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