\frac{x - y}{x + y}\frac{x}{x + y} - \frac{y}{x + y}double f(double x, double y) {
double r843954 = x;
double r843955 = y;
double r843956 = r843954 - r843955;
double r843957 = r843954 + r843955;
double r843958 = r843956 / r843957;
return r843958;
}
double f(double x, double y) {
double r843959 = x;
double r843960 = y;
double r843961 = r843959 + r843960;
double r843962 = r843959 / r843961;
double r843963 = r843960 / r843961;
double r843964 = r843962 - r843963;
return r843964;
}




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
Final simplification0.0
herbie shell --seed 2020020 +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)))