\log \left(1 + e^{x}\right) - x \cdot y\log \left(1 + e^{x}\right) - y \cdot xdouble f(double x, double y) {
double r25076761 = 1.0;
double r25076762 = x;
double r25076763 = exp(r25076762);
double r25076764 = r25076761 + r25076763;
double r25076765 = log(r25076764);
double r25076766 = y;
double r25076767 = r25076762 * r25076766;
double r25076768 = r25076765 - r25076767;
return r25076768;
}
double f(double x, double y) {
double r25076769 = 1.0;
double r25076770 = x;
double r25076771 = exp(r25076770);
double r25076772 = r25076769 + r25076771;
double r25076773 = log(r25076772);
double r25076774 = y;
double r25076775 = r25076774 * r25076770;
double r25076776 = r25076773 - r25076775;
return r25076776;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.6 |
|---|---|
| Target | 0.1 |
| Herbie | 0.6 |
Initial program 0.6
Final simplification0.6
herbie shell --seed 2019124
(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)))