e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r176456 = a;
double r176457 = log(r176456);
double r176458 = b;
double r176459 = log(r176458);
double r176460 = r176457 + r176459;
double r176461 = exp(r176460);
return r176461;
}
double f(double a, double b) {
double r176462 = a;
double r176463 = b;
double r176464 = r176462 * r176463;
return r176464;
}




Bits error versus a




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