e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r3903639 = a;
double r3903640 = log(r3903639);
double r3903641 = b;
double r3903642 = log(r3903641);
double r3903643 = r3903640 + r3903642;
double r3903644 = exp(r3903643);
return r3903644;
}
double f(double a, double b) {
double r3903645 = b;
double r3903646 = a;
double r3903647 = r3903645 * r3903646;
return r3903647;
}




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