e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r145544 = a;
double r145545 = log(r145544);
double r145546 = b;
double r145547 = log(r145546);
double r145548 = r145545 + r145547;
double r145549 = exp(r145548);
return r145549;
}
double f(double a, double b) {
double r145550 = a;
double r145551 = b;
double r145552 = r145550 * r145551;
return r145552;
}




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