e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r110975 = a;
double r110976 = log(r110975);
double r110977 = b;
double r110978 = log(r110977);
double r110979 = r110976 + r110978;
double r110980 = exp(r110979);
return r110980;
}
double f(double a, double b) {
double r110981 = b;
double r110982 = a;
double r110983 = r110981 * r110982;
return r110983;
}




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