e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r161967 = a;
double r161968 = log(r161967);
double r161969 = b;
double r161970 = log(r161969);
double r161971 = r161968 + r161970;
double r161972 = exp(r161971);
return r161972;
}
double f(double a, double b) {
double r161973 = a;
double r161974 = b;
double r161975 = r161973 * r161974;
return r161975;
}




Bits error versus a




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