\log \left(1 + e^{x}\right) - x \cdot y\log \left(\log \left(e^{e^{x}} \cdot e\right)\right) - y \cdot xdouble f(double x, double y) {
double r2544080 = 1.0;
double r2544081 = x;
double r2544082 = exp(r2544081);
double r2544083 = r2544080 + r2544082;
double r2544084 = log(r2544083);
double r2544085 = y;
double r2544086 = r2544081 * r2544085;
double r2544087 = r2544084 - r2544086;
return r2544087;
}
double f(double x, double y) {
double r2544088 = x;
double r2544089 = exp(r2544088);
double r2544090 = exp(r2544089);
double r2544091 = exp(1.0);
double r2544092 = r2544090 * r2544091;
double r2544093 = log(r2544092);
double r2544094 = log(r2544093);
double r2544095 = y;
double r2544096 = r2544095 * r2544088;
double r2544097 = r2544094 - r2544096;
return r2544097;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.6 |
|---|---|
| Target | 0.1 |
| Herbie | 0.6 |
Initial program 0.6
rmApplied add-log-exp0.6
Applied add-log-exp0.6
Applied sum-log0.6
Simplified0.6
Final simplification0.6
herbie shell --seed 2019151
(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)))