\log \left(1 + e^{x}\right) - x \cdot y\log \left(1 + e^{x}\right) - x \cdot ydouble f(double x, double y) {
double r160852 = 1.0;
double r160853 = x;
double r160854 = exp(r160853);
double r160855 = r160852 + r160854;
double r160856 = log(r160855);
double r160857 = y;
double r160858 = r160853 * r160857;
double r160859 = r160856 - r160858;
return r160859;
}
double f(double x, double y) {
double r160860 = 1.0;
double r160861 = x;
double r160862 = exp(r160861);
double r160863 = r160860 + r160862;
double r160864 = log(r160863);
double r160865 = y;
double r160866 = r160861 * r160865;
double r160867 = r160864 - r160866;
return r160867;
}




Bits error versus x




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