e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r146340 = a;
double r146341 = log(r146340);
double r146342 = b;
double r146343 = log(r146342);
double r146344 = r146341 + r146343;
double r146345 = exp(r146344);
return r146345;
}
double f(double a, double b) {
double r146346 = a;
double r146347 = b;
double r146348 = r146346 * r146347;
return r146348;
}




Bits error versus a




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