Average Error: 5.7 → 0
Time: 4.7s
Precision: 64
\[e^{\log a + \log b}\]
\[a \cdot b\]
e^{\log a + \log b}
a \cdot b
double f(double a, double b) {
        double r129001 = a;
        double r129002 = log(r129001);
        double r129003 = b;
        double r129004 = log(r129003);
        double r129005 = r129002 + r129004;
        double r129006 = exp(r129005);
        return r129006;
}

double f(double a, double b) {
        double r129007 = a;
        double r129008 = b;
        double r129009 = r129007 * r129008;
        return r129009;
}

Error

Bits error versus a

Bits error versus b

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original5.7
Target0
Herbie0
\[a \cdot b\]

Derivation

  1. Initial program 5.7

    \[e^{\log a + \log b}\]
  2. Simplified0

    \[\leadsto \color{blue}{a \cdot b}\]
  3. Final simplification0

    \[\leadsto a \cdot b\]

Reproduce

herbie shell --seed 2019194 +o rules:numerics
(FPCore (a b)
  :name "Exp of sum of logs"

  :herbie-target
  (* a b)

  (exp (+ (log a) (log b))))