\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 r820409 = x;
double r820410 = y;
double r820411 = r820409 - r820410;
double r820412 = r820409 + r820410;
double r820413 = r820411 / r820412;
return r820413;
}
double f(double x, double y) {
double r820414 = x;
double r820415 = y;
double r820416 = r820414 + r820415;
double r820417 = r820414 / r820416;
double r820418 = r820417 * r820417;
double r820419 = r820415 / r820416;
double r820420 = r820419 * r820419;
double r820421 = r820418 - r820420;
double r820422 = r820417 + r820419;
double r820423 = r820421 / r820422;
return r820423;
}




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 2020018
(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)))