e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r5687479 = a;
double r5687480 = log(r5687479);
double r5687481 = b;
double r5687482 = log(r5687481);
double r5687483 = r5687480 + r5687482;
double r5687484 = exp(r5687483);
return r5687484;
}
double f(double a, double b) {
double r5687485 = a;
double r5687486 = b;
double r5687487 = r5687485 * r5687486;
return r5687487;
}




Bits error versus a




Bits error versus b
Results
| Original | 5.8 |
|---|---|
| Target | 0 |
| Herbie | 0 |
Initial program 5.8
Simplified0
Final simplification0
herbie shell --seed 2019165
(FPCore (a b)
:name "Exp of sum of logs"
:herbie-target
(* a b)
(exp (+ (log a) (log b))))