\frac{x - y}{x + y}\frac{\frac{x}{x + y} \cdot \frac{x}{x + y} - \frac{y}{x + y} \cdot \frac{y}{x + y}}{\frac{x}{x + y} + \frac{y}{x + y}}double f(double x, double y) {
double r730247 = x;
double r730248 = y;
double r730249 = r730247 - r730248;
double r730250 = r730247 + r730248;
double r730251 = r730249 / r730250;
return r730251;
}
double f(double x, double y) {
double r730252 = x;
double r730253 = y;
double r730254 = r730252 + r730253;
double r730255 = r730252 / r730254;
double r730256 = r730255 * r730255;
double r730257 = r730253 / r730254;
double r730258 = r730257 * r730257;
double r730259 = r730256 - r730258;
double r730260 = r730255 + r730257;
double r730261 = r730259 / r730260;
return r730261;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 0.0
rmApplied div-sub0.0
rmApplied flip--0.0
Final simplification0.0
herbie shell --seed 2020083
(FPCore (x y)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, D"
:precision binary64
:herbie-target
(- (/ x (+ x y)) (/ y (+ x y)))
(/ (- x y) (+ x y)))