Average Error: 0.1 → 0.1
Time: 13.8s
Precision: 64
$\sqrt{x + 1} \cdot \sqrt{y} - \sqrt{x}$
$\sqrt{x + 1} \cdot \sqrt{y} - \sqrt{x}$
\sqrt{x + 1} \cdot \sqrt{y} - \sqrt{x}
\sqrt{x + 1} \cdot \sqrt{y} - \sqrt{x}
double f(double x, double y) {
double r1253067 = x;
double r1253068 = 1.0;
double r1253069 = r1253067 + r1253068;
double r1253070 = sqrt(r1253069);
double r1253071 = y;
double r1253072 = sqrt(r1253071);
double r1253073 = r1253070 * r1253072;
double r1253074 = sqrt(r1253067);
double r1253075 = r1253073 - r1253074;
return r1253075;
}


double f(double x, double y) {
double r1253076 = x;
double r1253077 = 1.0;
double r1253078 = r1253076 + r1253077;
double r1253079 = sqrt(r1253078);
double r1253080 = y;
double r1253081 = sqrt(r1253080);
double r1253082 = r1253079 * r1253081;
double r1253083 = sqrt(r1253076);
double r1253084 = r1253082 - r1253083;
return r1253084;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 0.1

$\sqrt{x + 1} \cdot \sqrt{y} - \sqrt{x}$
2. Final simplification0.1

$\leadsto \sqrt{x + 1} \cdot \sqrt{y} - \sqrt{x}$

# Reproduce

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