\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 r524576 = x;
double r524577 = y;
double r524578 = r524576 - r524577;
double r524579 = r524576 + r524577;
double r524580 = r524578 / r524579;
return r524580;
}
double f(double x, double y) {
double r524581 = x;
double r524582 = y;
double r524583 = r524581 + r524582;
double r524584 = r524581 / r524583;
double r524585 = r524584 * r524584;
double r524586 = r524582 / r524583;
double r524587 = r524586 * r524586;
double r524588 = r524585 - r524587;
double r524589 = r524584 + r524586;
double r524590 = r524588 / r524589;
return r524590;
}




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