\frac{x - y}{2 - \left(x + y\right)}\begin{array}{l}
\mathbf{if}\;x \le -1.8286949592281574 \lor \neg \left(x \le 8.4800696698330235 \cdot 10^{-105}\right):\\
\;\;\;\;\frac{\frac{x}{2 - \left(x + y\right)} \cdot \frac{x}{2 - \left(x + y\right)} - \frac{y}{2 - \left(x + y\right)} \cdot \frac{y}{2 - \left(x + y\right)}}{\frac{x}{2 - \left(x + y\right)} + \frac{y}{2 - \left(x + y\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 r1346864 = x;
double r1346865 = y;
double r1346866 = r1346864 - r1346865;
double r1346867 = 2.0;
double r1346868 = r1346864 + r1346865;
double r1346869 = r1346867 - r1346868;
double r1346870 = r1346866 / r1346869;
return r1346870;
}
double f(double x, double y) {
double r1346871 = x;
double r1346872 = -1.8286949592281574;
bool r1346873 = r1346871 <= r1346872;
double r1346874 = 8.480069669833023e-105;
bool r1346875 = r1346871 <= r1346874;
double r1346876 = !r1346875;
bool r1346877 = r1346873 || r1346876;
double r1346878 = 2.0;
double r1346879 = y;
double r1346880 = r1346871 + r1346879;
double r1346881 = r1346878 - r1346880;
double r1346882 = r1346871 / r1346881;
double r1346883 = r1346882 * r1346882;
double r1346884 = r1346879 / r1346881;
double r1346885 = r1346884 * r1346884;
double r1346886 = r1346883 - r1346885;
double r1346887 = r1346882 + r1346884;
double r1346888 = r1346886 / r1346887;
double r1346889 = r1346878 * r1346878;
double r1346890 = r1346880 * r1346880;
double r1346891 = r1346889 - r1346890;
double r1346892 = r1346871 / r1346891;
double r1346893 = r1346878 + r1346880;
double r1346894 = r1346892 * r1346893;
double r1346895 = r1346894 - r1346884;
double r1346896 = r1346877 ? r1346888 : r1346895;
return r1346896;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
if x < -1.8286949592281574 or 8.480069669833023e-105 < x Initial program 0.0
rmApplied div-sub0.0
rmApplied flip--0.0
if -1.8286949592281574 < x < 8.480069669833023e-105Initial program 0.0
rmApplied div-sub0.0
rmApplied flip--0.0
Applied associate-/r/0.0
Final simplification0.0
herbie shell --seed 2020065
(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))))