e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r2253007 = a;
double r2253008 = log(r2253007);
double r2253009 = b;
double r2253010 = log(r2253009);
double r2253011 = r2253008 + r2253010;
double r2253012 = exp(r2253011);
return r2253012;
}
double f(double a, double b) {
double r2253013 = b;
double r2253014 = a;
double r2253015 = r2253013 * r2253014;
return r2253015;
}




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