e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r174566 = a;
double r174567 = log(r174566);
double r174568 = b;
double r174569 = log(r174568);
double r174570 = r174567 + r174569;
double r174571 = exp(r174570);
return r174571;
}
double f(double a, double b) {
double r174572 = a;
double r174573 = b;
double r174574 = r174572 * r174573;
return r174574;
}




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