e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r6631851 = a;
double r6631852 = log(r6631851);
double r6631853 = b;
double r6631854 = log(r6631853);
double r6631855 = r6631852 + r6631854;
double r6631856 = exp(r6631855);
return r6631856;
}
double f(double a, double b) {
double r6631857 = b;
double r6631858 = a;
double r6631859 = r6631857 * r6631858;
return r6631859;
}




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