e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r71494 = a;
double r71495 = log(r71494);
double r71496 = b;
double r71497 = log(r71496);
double r71498 = r71495 + r71497;
double r71499 = exp(r71498);
return r71499;
}
double f(double a, double b) {
double r71500 = b;
double r71501 = a;
double r71502 = r71500 * r71501;
return r71502;
}




Bits error versus a




Bits error versus b
Results
| Original | 5.7 |
|---|---|
| Target | 0 |
| Herbie | 0 |
Initial program 5.7
Simplified0
Final simplification0
herbie shell --seed 2019305
(FPCore (a b)
:name "Exp of sum of logs"
:precision binary64
:herbie-target
(* a b)
(exp (+ (log a) (log b))))