\frac{x - y}{x + y}\frac{x}{x + y} - \frac{1}{\frac{x + y}{y}}double f(double x, double y) {
double r1007855 = x;
double r1007856 = y;
double r1007857 = r1007855 - r1007856;
double r1007858 = r1007855 + r1007856;
double r1007859 = r1007857 / r1007858;
return r1007859;
}
double f(double x, double y) {
double r1007860 = x;
double r1007861 = y;
double r1007862 = r1007860 + r1007861;
double r1007863 = r1007860 / r1007862;
double r1007864 = 1.0;
double r1007865 = r1007862 / r1007861;
double r1007866 = r1007864 / r1007865;
double r1007867 = r1007863 - r1007866;
return r1007867;
}




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 2019353 +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)))