\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 r4286398 = 1.0;
double r4286399 = x;
double r4286400 = exp(r4286399);
double r4286401 = r4286398 + r4286400;
double r4286402 = log(r4286401);
double r4286403 = y;
double r4286404 = r4286399 * r4286403;
double r4286405 = r4286402 - r4286404;
return r4286405;
}
double f(double x, double y) {
double r4286406 = x;
double r4286407 = exp(r4286406);
double r4286408 = exp(r4286407);
double r4286409 = exp(1.0);
double r4286410 = r4286408 * r4286409;
double r4286411 = log(r4286410);
double r4286412 = log(r4286411);
double r4286413 = y;
double r4286414 = r4286413 * r4286406;
double r4286415 = r4286412 - r4286414;
return r4286415;
}




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)))