\frac{x - y}{x + y}\log \left(\sqrt{e^{\frac{x - y}{x + y}}}\right) + \frac{1}{2} \cdot \frac{x - y}{x + y}double f(double x, double y) {
double r885869 = x;
double r885870 = y;
double r885871 = r885869 - r885870;
double r885872 = r885869 + r885870;
double r885873 = r885871 / r885872;
return r885873;
}
double f(double x, double y) {
double r885874 = x;
double r885875 = y;
double r885876 = r885874 - r885875;
double r885877 = r885874 + r885875;
double r885878 = r885876 / r885877;
double r885879 = exp(r885878);
double r885880 = sqrt(r885879);
double r885881 = log(r885880);
double r885882 = 0.5;
double r885883 = r885882 * r885878;
double r885884 = r885881 + r885883;
return r885884;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 0.0
rmApplied add-log-exp0.0
rmApplied add-sqr-sqrt0.0
Applied log-prod0.0
rmApplied pow1/20.0
Applied log-pow0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2020001
(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)))