\frac{x - y}{x + y}\log \left(e^{\frac{x}{y + x}}\right) - \log \left(e^{\frac{y}{y + x}}\right)double f(double x, double y) {
double r37853018 = x;
double r37853019 = y;
double r37853020 = r37853018 - r37853019;
double r37853021 = r37853018 + r37853019;
double r37853022 = r37853020 / r37853021;
return r37853022;
}
double f(double x, double y) {
double r37853023 = x;
double r37853024 = y;
double r37853025 = r37853024 + r37853023;
double r37853026 = r37853023 / r37853025;
double r37853027 = exp(r37853026);
double r37853028 = log(r37853027);
double r37853029 = r37853024 / r37853025;
double r37853030 = exp(r37853029);
double r37853031 = log(r37853030);
double r37853032 = r37853028 - r37853031;
return r37853032;
}




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 add-log-exp0.0
rmApplied add-log-exp0.0
Final simplification0.0
herbie shell --seed 2019192 +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)))