\log \left(1 + e^{x}\right) - x \cdot y\log \left(1 + e^{x}\right) - y \cdot xdouble f(double x, double y) {
double r2414708 = 1.0;
double r2414709 = x;
double r2414710 = exp(r2414709);
double r2414711 = r2414708 + r2414710;
double r2414712 = log(r2414711);
double r2414713 = y;
double r2414714 = r2414709 * r2414713;
double r2414715 = r2414712 - r2414714;
return r2414715;
}
double f(double x, double y) {
double r2414716 = 1.0;
double r2414717 = x;
double r2414718 = exp(r2414717);
double r2414719 = r2414716 + r2414718;
double r2414720 = log(r2414719);
double r2414721 = y;
double r2414722 = r2414721 * r2414717;
double r2414723 = r2414720 - r2414722;
return r2414723;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.5 |
|---|---|
| Target | 0.1 |
| Herbie | 0.5 |
Initial program 0.5
Final simplification0.5
herbie shell --seed 2019152
(FPCore (x y)
:name "Logistic regression 2"
:herbie-target
(if (<= x 0) (- (log (+ 1 (exp x))) (* x y)) (- (log (+ 1 (exp (- x)))) (* (- x) (- 1 y))))
(- (log (+ 1 (exp x))) (* x y)))