\sqrt{x \cdot x + y \cdot y}\mathsf{hypot}\left(x, y\right)double f(double x, double y) {
double r637088 = x;
double r637089 = r637088 * r637088;
double r637090 = y;
double r637091 = r637090 * r637090;
double r637092 = r637089 + r637091;
double r637093 = sqrt(r637092);
return r637093;
}
double f(double x, double y) {
double r637094 = x;
double r637095 = y;
double r637096 = hypot(r637094, r637095);
return r637096;
}




Bits error versus x




Bits error versus y
Results
| Original | 30.9 |
|---|---|
| Target | 17.0 |
| Herbie | 0.0 |
Initial program 30.9
Simplified0.0
Final simplification0.0
herbie shell --seed 2019194 +o rules:numerics
(FPCore (x y)
:name "Data.Octree.Internal:octantDistance from Octree-0.5.4.2"
:herbie-target
(if (< x -1.1236950826599826e+145) (- x) (if (< x 1.116557621183362e+93) (sqrt (+ (* x x) (* y y))) x))
(sqrt (+ (* x x) (* y y))))