\frac{x - y}{2 - \left(x + y\right)}\begin{array}{l}
\mathbf{if}\;x \le -26.31554417036707249621940718498080968857 \lor \neg \left(x \le 2.234979756987889017030695587777766726471 \cdot 10^{-98}\right):\\
\;\;\;\;\frac{x}{2 - \left(x + y\right)} - \log \left(e^{\frac{y}{2 - \left(x + y\right)}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{2 \cdot 2 - \left(x + y\right) \cdot \left(x + y\right)} \cdot \left(2 + \left(x + y\right)\right) - \frac{y}{2 - \left(x + y\right)}\\
\end{array}double f(double x, double y) {
double r838487 = x;
double r838488 = y;
double r838489 = r838487 - r838488;
double r838490 = 2.0;
double r838491 = r838487 + r838488;
double r838492 = r838490 - r838491;
double r838493 = r838489 / r838492;
return r838493;
}
double f(double x, double y) {
double r838494 = x;
double r838495 = -26.315544170367072;
bool r838496 = r838494 <= r838495;
double r838497 = 2.234979756987889e-98;
bool r838498 = r838494 <= r838497;
double r838499 = !r838498;
bool r838500 = r838496 || r838499;
double r838501 = 2.0;
double r838502 = y;
double r838503 = r838494 + r838502;
double r838504 = r838501 - r838503;
double r838505 = r838494 / r838504;
double r838506 = r838502 / r838504;
double r838507 = exp(r838506);
double r838508 = log(r838507);
double r838509 = r838505 - r838508;
double r838510 = r838501 * r838501;
double r838511 = r838503 * r838503;
double r838512 = r838510 - r838511;
double r838513 = r838494 / r838512;
double r838514 = r838501 + r838503;
double r838515 = r838513 * r838514;
double r838516 = r838515 - r838506;
double r838517 = r838500 ? r838509 : r838516;
return r838517;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.3 |
if x < -26.315544170367072 or 2.234979756987889e-98 < x Initial program 0.0
rmApplied div-sub0.0
rmApplied add-log-exp0.5
if -26.315544170367072 < x < 2.234979756987889e-98Initial program 0.0
rmApplied div-sub0.0
rmApplied flip--0.0
Applied associate-/r/0.0
Final simplification0.3
herbie shell --seed 2019353
(FPCore (x y)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, C"
:precision binary64
:herbie-target
(- (/ x (- 2 (+ x y))) (/ y (- 2 (+ x y))))
(/ (- x y) (- 2 (+ x y))))