e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r46130181 = a;
double r46130182 = log(r46130181);
double r46130183 = b;
double r46130184 = log(r46130183);
double r46130185 = r46130182 + r46130184;
double r46130186 = exp(r46130185);
return r46130186;
}
double f(double a, double b) {
double r46130187 = a;
double r46130188 = b;
double r46130189 = r46130187 * r46130188;
return r46130189;
}




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