\log \left(1 + e^{x}\right) - x \cdot y\sqrt{\log \left(1 + e^{x}\right)} \cdot \sqrt{\log \left(1 + e^{x}\right)} - x \cdot ydouble f(double x, double y) {
double r157449 = 1.0;
double r157450 = x;
double r157451 = exp(r157450);
double r157452 = r157449 + r157451;
double r157453 = log(r157452);
double r157454 = y;
double r157455 = r157450 * r157454;
double r157456 = r157453 - r157455;
return r157456;
}
double f(double x, double y) {
double r157457 = 1.0;
double r157458 = x;
double r157459 = exp(r157458);
double r157460 = r157457 + r157459;
double r157461 = log(r157460);
double r157462 = sqrt(r157461);
double r157463 = r157462 * r157462;
double r157464 = y;
double r157465 = r157458 * r157464;
double r157466 = r157463 - r157465;
return r157466;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.6 |
|---|---|
| Target | 0.0 |
| Herbie | 1.1 |
Initial program 0.6
rmApplied add-sqr-sqrt1.1
Final simplification1.1
herbie shell --seed 2020060
(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)))