\frac{x - y}{2 - \left(x + y\right)}\frac{-x}{\left(x + y\right) + -2} - \frac{y}{2 - \left(x + y\right)}(FPCore (x y) :precision binary64 (/ (- x y) (- 2.0 (+ x y))))
(FPCore (x y) :precision binary64 (- (/ (- x) (+ (+ x y) -2.0)) (/ y (- 2.0 (+ x y)))))
double code(double x, double y) {
return (x - y) / (2.0 - (x + y));
}
double code(double x, double y) {
return (-x / ((x + y) + -2.0)) - (y / (2.0 - (x + y)));
}






Bits error versus x






Bits error versus y
Results
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
| Alternative 1 | |
|---|---|
| Accuracy | 0.7 |
| Cost | 1408 |
| Alternative 2 | |
|---|---|
| Accuracy | 0.8 |
| Cost | 1920 |
Initial program 0.0
rmApplied div-sub_binary64_198610.0
rmApplied frac-2neg_binary64_198670.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2020322
(FPCore (x y)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, C"
:precision binary64
:herbie-target
(- (/ x (- 2.0 (+ x y))) (/ y (- 2.0 (+ x y))))
(/ (- x y) (- 2.0 (+ x y))))