Average Error: 0.0 → 0.0
Time: 12.6s
Precision: 64
$\sqrt{\frac{x}{x - 1}} - \sqrt{x}$
$\sqrt{\frac{x}{x - 1}} - \sqrt{x}$
\sqrt{\frac{x}{x - 1}} - \sqrt{x}
\sqrt{\frac{x}{x - 1}} - \sqrt{x}
double f(double x) {
double r2455077 = x;
double r2455078 = 1.0;
double r2455079 = r2455077 - r2455078;
double r2455080 = r2455077 / r2455079;
double r2455081 = sqrt(r2455080);
double r2455082 = sqrt(r2455077);
double r2455083 = r2455081 - r2455082;
return r2455083;
}


double f(double x) {
double r2455084 = x;
double r2455085 = 1.0;
double r2455086 = r2455084 - r2455085;
double r2455087 = r2455084 / r2455086;
double r2455088 = sqrt(r2455087);
double r2455089 = sqrt(r2455084);
double r2455090 = r2455088 - r2455089;
return r2455090;
}



# Try it out

Your Program's Arguments

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 0.0

$\sqrt{\frac{x}{x - 1}} - \sqrt{x}$
2. Final simplification0.0

$\leadsto \sqrt{\frac{x}{x - 1}} - \sqrt{x}$

# Reproduce

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