e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r6173305 = a;
double r6173306 = log(r6173305);
double r6173307 = b;
double r6173308 = log(r6173307);
double r6173309 = r6173306 + r6173308;
double r6173310 = exp(r6173309);
return r6173310;
}
double f(double a, double b) {
double r6173311 = a;
double r6173312 = b;
double r6173313 = r6173311 * r6173312;
return r6173313;
}




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