\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 r781059 = x;
double r781060 = y;
double r781061 = r781059 - r781060;
double r781062 = 2.0;
double r781063 = r781059 + r781060;
double r781064 = r781062 - r781063;
double r781065 = r781061 / r781064;
return r781065;
}
double f(double x, double y) {
double r781066 = x;
double r781067 = -26.315544170367072;
bool r781068 = r781066 <= r781067;
double r781069 = 2.234979756987889e-98;
bool r781070 = r781066 <= r781069;
double r781071 = !r781070;
bool r781072 = r781068 || r781071;
double r781073 = 2.0;
double r781074 = y;
double r781075 = r781066 + r781074;
double r781076 = r781073 - r781075;
double r781077 = r781066 / r781076;
double r781078 = r781074 / r781076;
double r781079 = exp(r781078);
double r781080 = log(r781079);
double r781081 = r781077 - r781080;
double r781082 = r781073 * r781073;
double r781083 = r781075 * r781075;
double r781084 = r781082 - r781083;
double r781085 = r781066 / r781084;
double r781086 = r781073 + r781075;
double r781087 = r781085 * r781086;
double r781088 = r781087 - r781078;
double r781089 = r781072 ? r781081 : r781088;
return r781089;
}




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))))