Average Error: 0.1 → 0.1
Time: 8.2s
Precision: 64
\[x \cdot 0.5 + y \cdot \left(\left(1 - z\right) + \log z\right)\]
\[\left(x \cdot 0.5 + 1 \cdot y\right) + \left(-\left(z - \log z\right)\right) \cdot y\]
x \cdot 0.5 + y \cdot \left(\left(1 - z\right) + \log z\right)
\left(x \cdot 0.5 + 1 \cdot y\right) + \left(-\left(z - \log z\right)\right) \cdot y
double f(double x, double y, double z) {
        double r316983 = x;
        double r316984 = 0.5;
        double r316985 = r316983 * r316984;
        double r316986 = y;
        double r316987 = 1.0;
        double r316988 = z;
        double r316989 = r316987 - r316988;
        double r316990 = log(r316988);
        double r316991 = r316989 + r316990;
        double r316992 = r316986 * r316991;
        double r316993 = r316985 + r316992;
        return r316993;
}

double f(double x, double y, double z) {
        double r316994 = x;
        double r316995 = 0.5;
        double r316996 = r316994 * r316995;
        double r316997 = 1.0;
        double r316998 = y;
        double r316999 = r316997 * r316998;
        double r317000 = r316996 + r316999;
        double r317001 = z;
        double r317002 = log(r317001);
        double r317003 = r317001 - r317002;
        double r317004 = -r317003;
        double r317005 = r317004 * r316998;
        double r317006 = r317000 + r317005;
        return r317006;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.1
Target0.1
Herbie0.1
\[\left(y + 0.5 \cdot x\right) - y \cdot \left(z - \log z\right)\]

Derivation

  1. Initial program 0.1

    \[x \cdot 0.5 + y \cdot \left(\left(1 - z\right) + \log z\right)\]
  2. Using strategy rm
  3. Applied associate-+l-0.1

    \[\leadsto x \cdot 0.5 + y \cdot \color{blue}{\left(1 - \left(z - \log z\right)\right)}\]
  4. Using strategy rm
  5. Applied sub-neg0.1

    \[\leadsto x \cdot 0.5 + y \cdot \color{blue}{\left(1 + \left(-\left(z - \log z\right)\right)\right)}\]
  6. Applied distribute-rgt-in0.1

    \[\leadsto x \cdot 0.5 + \color{blue}{\left(1 \cdot y + \left(-\left(z - \log z\right)\right) \cdot y\right)}\]
  7. Applied associate-+r+0.1

    \[\leadsto \color{blue}{\left(x \cdot 0.5 + 1 \cdot y\right) + \left(-\left(z - \log z\right)\right) \cdot y}\]
  8. Final simplification0.1

    \[\leadsto \left(x \cdot 0.5 + 1 \cdot y\right) + \left(-\left(z - \log z\right)\right) \cdot y\]

Reproduce

herbie shell --seed 2020047 
(FPCore (x y z)
  :name "System.Random.MWC.Distributions:gamma from mwc-random-0.13.3.2"
  :precision binary64

  :herbie-target
  (- (+ y (* 0.5 x)) (* y (- z (log z))))

  (+ (* x 0.5) (* y (+ (- 1 z) (log z)))))