e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r122000 = a;
double r122001 = log(r122000);
double r122002 = b;
double r122003 = log(r122002);
double r122004 = r122001 + r122003;
double r122005 = exp(r122004);
return r122005;
}
double f(double a, double b) {
double r122006 = b;
double r122007 = a;
double r122008 = r122006 * r122007;
return r122008;
}




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