Average Error: 5.7 → 0
Time: 4.3s
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 r6037752 = a;
        double r6037753 = log(r6037752);
        double r6037754 = b;
        double r6037755 = log(r6037754);
        double r6037756 = r6037753 + r6037755;
        double r6037757 = exp(r6037756);
        return r6037757;
}

double f(double a, double b) {
        double r6037758 = a;
        double r6037759 = b;
        double r6037760 = r6037758 * r6037759;
        return r6037760;
}

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 2019142 +o rules:numerics
(FPCore (a b)
  :name "Exp of sum of logs"

  :herbie-target
  (* a b)

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