\log \left(1 + e^{x}\right) - x \cdot y\left(\log \left(\sqrt{1 + e^{x}}\right) + \log \left(\sqrt{1 + e^{x}}\right)\right) - x \cdot ydouble f(double x, double y) {
double r157546 = 1.0;
double r157547 = x;
double r157548 = exp(r157547);
double r157549 = r157546 + r157548;
double r157550 = log(r157549);
double r157551 = y;
double r157552 = r157547 * r157551;
double r157553 = r157550 - r157552;
return r157553;
}
double f(double x, double y) {
double r157554 = 1.0;
double r157555 = x;
double r157556 = exp(r157555);
double r157557 = r157554 + r157556;
double r157558 = sqrt(r157557);
double r157559 = log(r157558);
double r157560 = r157559 + r157559;
double r157561 = y;
double r157562 = r157555 * r157561;
double r157563 = r157560 - r157562;
return r157563;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.5 |
|---|---|
| Target | 0.1 |
| Herbie | 1.0 |
Initial program 0.5
rmApplied add-sqr-sqrt1.3
Applied log-prod1.0
Final simplification1.0
herbie shell --seed 2020020
(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)))