e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r83656 = a;
double r83657 = log(r83656);
double r83658 = b;
double r83659 = log(r83658);
double r83660 = r83657 + r83659;
double r83661 = exp(r83660);
return r83661;
}
double f(double a, double b) {
double r83662 = b;
double r83663 = a;
double r83664 = r83662 * r83663;
return r83664;
}




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