e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r134583 = a;
double r134584 = log(r134583);
double r134585 = b;
double r134586 = log(r134585);
double r134587 = r134584 + r134586;
double r134588 = exp(r134587);
return r134588;
}
double f(double a, double b) {
double r134589 = b;
double r134590 = a;
double r134591 = r134589 * r134590;
return r134591;
}




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 2020046
(FPCore (a b)
:name "Exp of sum of logs"
:precision binary64
:herbie-target
(* a b)
(exp (+ (log a) (log b))))