\frac{x - y}{x + y}\frac{1}{\frac{y}{x} + 1} - \frac{y}{x + y}double f(double x, double y) {
double r809911 = x;
double r809912 = y;
double r809913 = r809911 - r809912;
double r809914 = r809911 + r809912;
double r809915 = r809913 / r809914;
return r809915;
}
double f(double x, double y) {
double r809916 = 1.0;
double r809917 = y;
double r809918 = x;
double r809919 = r809917 / r809918;
double r809920 = r809919 + r809916;
double r809921 = r809916 / r809920;
double r809922 = r809918 + r809917;
double r809923 = r809917 / r809922;
double r809924 = r809921 - r809923;
return r809924;
}




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
Taylor expanded around 0 0.0
Final simplification0.0
herbie shell --seed 2020045
(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)))