e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r164586 = a;
double r164587 = log(r164586);
double r164588 = b;
double r164589 = log(r164588);
double r164590 = r164587 + r164589;
double r164591 = exp(r164590);
return r164591;
}
double f(double a, double b) {
double r164592 = a;
double r164593 = b;
double r164594 = r164592 * r164593;
return r164594;
}




Bits error versus a




Bits error versus b
Results
| Original | 5.7 |
|---|---|
| Target | 0 |
| Herbie | 0 |
Initial program 5.7
rmApplied exp-sum5.4
Simplified4.7
Simplified0
Final simplification0
herbie shell --seed 2020024 +o rules:numerics
(FPCore (a b)
:name "Exp of sum of logs"
:precision binary64
:herbie-target
(* a b)
(exp (+ (log a) (log b))))