Average Error: 8.4 → 8.4
Time: 10.3s
Precision: 64
$\sqrt{x1 \cdot x2 + \left(y1 + y2\right)}$
$\sqrt{x1 \cdot x2 + \left(y1 + y2\right)}$
\sqrt{x1 \cdot x2 + \left(y1 + y2\right)}
\sqrt{x1 \cdot x2 + \left(y1 + y2\right)}
double f(double x1, double x2, double y1, double y2) {
double r2361579 = x1;
double r2361580 = x2;
double r2361581 = r2361579 * r2361580;
double r2361582 = y1;
double r2361583 = y2;
double r2361584 = r2361582 + r2361583;
double r2361585 = r2361581 + r2361584;
double r2361586 = sqrt(r2361585);
return r2361586;
}


double f(double x1, double x2, double y1, double y2) {
double r2361587 = x1;
double r2361588 = x2;
double r2361589 = r2361587 * r2361588;
double r2361590 = y1;
double r2361591 = y2;
double r2361592 = r2361590 + r2361591;
double r2361593 = r2361589 + r2361592;
double r2361594 = sqrt(r2361593);
return r2361594;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 8.4

$\sqrt{x1 \cdot x2 + \left(y1 + y2\right)}$
2. Final simplification8.4

$\leadsto \sqrt{x1 \cdot x2 + \left(y1 + y2\right)}$

# Reproduce

herbie shell --seed 1
(FPCore (x1 x2 y1 y2)
:name "sqrt((x1 * x2)+(y1+y2))"
:precision binary64
(sqrt (+ (* x1 x2) (+ y1 y2))))