e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r6338721 = a;
double r6338722 = log(r6338721);
double r6338723 = b;
double r6338724 = log(r6338723);
double r6338725 = r6338722 + r6338724;
double r6338726 = exp(r6338725);
return r6338726;
}
double f(double a, double b) {
double r6338727 = a;
double r6338728 = b;
double r6338729 = r6338727 * r6338728;
return r6338729;
}




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