\log \left(1 + e^{x}\right) - x \cdot y\sqrt{\log \left(1 + e^{x}\right)} \cdot \sqrt{\log \left(\sqrt{1 + e^{x}}\right) + \log \left(\sqrt{1 + e^{x}}\right)} - x \cdot ydouble f(double x, double y) {
double r117479 = 1.0;
double r117480 = x;
double r117481 = exp(r117480);
double r117482 = r117479 + r117481;
double r117483 = log(r117482);
double r117484 = y;
double r117485 = r117480 * r117484;
double r117486 = r117483 - r117485;
return r117486;
}
double f(double x, double y) {
double r117487 = 1.0;
double r117488 = x;
double r117489 = exp(r117488);
double r117490 = r117487 + r117489;
double r117491 = log(r117490);
double r117492 = sqrt(r117491);
double r117493 = sqrt(r117490);
double r117494 = log(r117493);
double r117495 = r117494 + r117494;
double r117496 = sqrt(r117495);
double r117497 = r117492 * r117496;
double r117498 = y;
double r117499 = r117488 * r117498;
double r117500 = r117497 - r117499;
return r117500;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.4 |
|---|---|
| Target | 0.1 |
| Herbie | 0.4 |
Initial program 0.4
rmApplied add-sqr-sqrt0.9
rmApplied add-sqr-sqrt0.9
Applied log-prod0.4
Final simplification0.4
herbie shell --seed 2019209
(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)))