e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r129001 = a;
double r129002 = log(r129001);
double r129003 = b;
double r129004 = log(r129003);
double r129005 = r129002 + r129004;
double r129006 = exp(r129005);
return r129006;
}
double f(double a, double b) {
double r129007 = a;
double r129008 = b;
double r129009 = r129007 * r129008;
return r129009;
}




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