e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r3735547 = a;
double r3735548 = log(r3735547);
double r3735549 = b;
double r3735550 = log(r3735549);
double r3735551 = r3735548 + r3735550;
double r3735552 = exp(r3735551);
return r3735552;
}
double f(double a, double b) {
double r3735553 = a;
double r3735554 = b;
double r3735555 = r3735553 * r3735554;
return r3735555;
}




Bits error versus a




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