e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r166085 = a;
double r166086 = log(r166085);
double r166087 = b;
double r166088 = log(r166087);
double r166089 = r166086 + r166088;
double r166090 = exp(r166089);
return r166090;
}
double f(double a, double b) {
double r166091 = a;
double r166092 = b;
double r166093 = r166091 * r166092;
return r166093;
}




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