\frac{x - y}{x + y}\frac{1}{\frac{x + y}{x}} - \frac{y}{x + y}double f(double x, double y) {
double r474909 = x;
double r474910 = y;
double r474911 = r474909 - r474910;
double r474912 = r474909 + r474910;
double r474913 = r474911 / r474912;
return r474913;
}
double f(double x, double y) {
double r474914 = 1.0;
double r474915 = x;
double r474916 = y;
double r474917 = r474915 + r474916;
double r474918 = r474917 / r474915;
double r474919 = r474914 / r474918;
double r474920 = r474916 / r474917;
double r474921 = r474919 - r474920;
return r474921;
}




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 clear-num0.0
Final simplification0.0
herbie shell --seed 2019305 +o rules:numerics
(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)))