e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r6076152 = a;
double r6076153 = log(r6076152);
double r6076154 = b;
double r6076155 = log(r6076154);
double r6076156 = r6076153 + r6076155;
double r6076157 = exp(r6076156);
return r6076157;
}
double f(double a, double b) {
double r6076158 = b;
double r6076159 = a;
double r6076160 = r6076158 * r6076159;
return r6076160;
}




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