\frac{x - y}{x + y}\left(\left(-\frac{y}{x - y}\right) \cdot \frac{x - y}{y + x} + \frac{x - y}{y + x} \cdot \frac{y}{x - y}\right) + \left(\frac{x}{y + x} - \frac{x - y}{y + x} \cdot \frac{y}{x - y}\right)double f(double x, double y) {
double r32316264 = x;
double r32316265 = y;
double r32316266 = r32316264 - r32316265;
double r32316267 = r32316264 + r32316265;
double r32316268 = r32316266 / r32316267;
return r32316268;
}
double f(double x, double y) {
double r32316269 = y;
double r32316270 = x;
double r32316271 = r32316270 - r32316269;
double r32316272 = r32316269 / r32316271;
double r32316273 = -r32316272;
double r32316274 = r32316269 + r32316270;
double r32316275 = r32316271 / r32316274;
double r32316276 = r32316273 * r32316275;
double r32316277 = r32316275 * r32316272;
double r32316278 = r32316276 + r32316277;
double r32316279 = r32316270 / r32316274;
double r32316280 = r32316279 - r32316277;
double r32316281 = r32316278 + r32316280;
return r32316281;
}




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-+18.9
Applied associate-/r/19.0
Applied *-un-lft-identity19.0
Applied add-sqr-sqrt41.2
Applied times-frac41.2
Applied prod-diff41.2
Simplified7.3
Simplified0.0
Final simplification0.0
herbie shell --seed 2019162 +o rules:numerics
(FPCore (x y)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, D"
:herbie-target
(- (/ x (+ x y)) (/ y (+ x y)))
(/ (- x y) (+ x y)))