e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r4519045 = a;
double r4519046 = log(r4519045);
double r4519047 = b;
double r4519048 = log(r4519047);
double r4519049 = r4519046 + r4519048;
double r4519050 = exp(r4519049);
return r4519050;
}
double f(double a, double b) {
double r4519051 = b;
double r4519052 = a;
double r4519053 = r4519051 * r4519052;
return r4519053;
}




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 2019171 +o rules:numerics
(FPCore (a b)
:name "Exp of sum of logs"
:herbie-target
(* a b)
(exp (+ (log a) (log b))))