e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r97432 = a;
double r97433 = log(r97432);
double r97434 = b;
double r97435 = log(r97434);
double r97436 = r97433 + r97435;
double r97437 = exp(r97436);
return r97437;
}
double f(double a, double b) {
double r97438 = b;
double r97439 = a;
double r97440 = r97438 * r97439;
return r97440;
}




Bits error versus a




Bits error versus b
Results
| Original | 5.7 |
|---|---|
| Target | 0 |
| Herbie | 0 |
Initial program 5.7
Simplified0
Final simplification0
herbie shell --seed 2019350 +o rules:numerics
(FPCore (a b)
:name "Exp of sum of logs"
:precision binary64
:herbie-target
(* a b)
(exp (+ (log a) (log b))))