\frac{x \cdot y}{y + 1}x \cdot \frac{1}{\frac{y + 1}{y}}double f(double x, double y) {
double r1145988 = x;
double r1145989 = y;
double r1145990 = r1145988 * r1145989;
double r1145991 = 1.0;
double r1145992 = r1145989 + r1145991;
double r1145993 = r1145990 / r1145992;
return r1145993;
}
double f(double x, double y) {
double r1145994 = x;
double r1145995 = 1.0;
double r1145996 = y;
double r1145997 = 1.0;
double r1145998 = r1145996 + r1145997;
double r1145999 = r1145998 / r1145996;
double r1146000 = r1145995 / r1145999;
double r1146001 = r1145994 * r1146000;
return r1146001;
}




Bits error versus x




Bits error versus y
Results
| Original | 8.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.1 |
Initial program 8.0
rmApplied *-un-lft-identity8.0
Applied times-frac0.0
Simplified0.0
rmApplied clear-num0.1
Final simplification0.1
herbie shell --seed 2019235 +o rules:numerics
(FPCore (x y)
:name "Diagrams.Trail:splitAtParam from diagrams-lib-1.3.0.3, B"
:precision binary64
:herbie-target
(if (< y -3693.84827882972468) (- (/ x (* y y)) (- (/ x y) x)) (if (< y 6799310503.41891003) (/ (* x y) (+ y 1)) (- (/ x (* y y)) (- (/ x y) x))))
(/ (* x y) (+ y 1)))