e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r85589 = a;
double r85590 = log(r85589);
double r85591 = b;
double r85592 = log(r85591);
double r85593 = r85590 + r85592;
double r85594 = exp(r85593);
return r85594;
}
double f(double a, double b) {
double r85595 = b;
double r85596 = a;
double r85597 = r85595 * r85596;
return r85597;
}




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