e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r5623359 = a;
double r5623360 = log(r5623359);
double r5623361 = b;
double r5623362 = log(r5623361);
double r5623363 = r5623360 + r5623362;
double r5623364 = exp(r5623363);
return r5623364;
}
double f(double a, double b) {
double r5623365 = a;
double r5623366 = b;
double r5623367 = r5623365 * r5623366;
return r5623367;
}




Bits error versus a




Bits error versus b
Results
| Original | 5.6 |
|---|---|
| Target | 0 |
| Herbie | 0 |
Initial program 5.6
Simplified0
Final simplification0
herbie shell --seed 2019200
(FPCore (a b)
:name "Exp of sum of logs"
:herbie-target
(* a b)
(exp (+ (log a) (log b))))