Average Error: 0 → 0
Time: 4.8s
Precision: 64
$\sqrt{{x}^{2} + {y}^{2}}$
$\sqrt{{x}^{2} + {y}^{2}}$
\sqrt{{x}^{2} + {y}^{2}}
\sqrt{{x}^{2} + {y}^{2}}
double f(double x, double y) {
double r2247610 = x;
double r2247611 = 2.0;
double r2247612 = pow(r2247610, r2247611);
double r2247613 = y;
double r2247614 = pow(r2247613, r2247611);
double r2247615 = r2247612 + r2247614;
double r2247616 = sqrt(r2247615);
return r2247616;
}


double f(double x, double y) {
double r2247617 = x;
double r2247618 = 2.0;
double r2247619 = pow(r2247617, r2247618);
double r2247620 = y;
double r2247621 = pow(r2247620, r2247618);
double r2247622 = r2247619 + r2247621;
double r2247623 = sqrt(r2247622);
return r2247623;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 0

$\sqrt{{x}^{2} + {y}^{2}}$
2. Final simplification0

$\leadsto \sqrt{{x}^{2} + {y}^{2}}$

# Reproduce

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