e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r158627 = a;
double r158628 = log(r158627);
double r158629 = b;
double r158630 = log(r158629);
double r158631 = r158628 + r158630;
double r158632 = exp(r158631);
return r158632;
}
double f(double a, double b) {
double r158633 = a;
double r158634 = b;
double r158635 = r158633 * r158634;
return r158635;
}




Bits error versus a




Bits error versus b
Results
| Original | 5.7 |
|---|---|
| Target | 0 |
| Herbie | 0 |
Initial program 5.7
rmApplied exp-sum5.4
Simplified4.7
Simplified0
Final simplification0
herbie shell --seed 2020039 +o rules:numerics
(FPCore (a b)
:name "Exp of sum of logs"
:precision binary64
:herbie-target
(* a b)
(exp (+ (log a) (log b))))