Average Error: 0.1 → 0.1
Time: 10.3s
Precision: 64
\[x \cdot 0.5 + y \cdot \left(\left(1 - z\right) + \log z\right)\]
\[x \cdot 0.5 + \left(y \cdot \left(1 - z\right) + y \cdot \log z\right)\]
x \cdot 0.5 + y \cdot \left(\left(1 - z\right) + \log z\right)
x \cdot 0.5 + \left(y \cdot \left(1 - z\right) + y \cdot \log z\right)
double f(double x, double y, double z) {
        double r359577 = x;
        double r359578 = 0.5;
        double r359579 = r359577 * r359578;
        double r359580 = y;
        double r359581 = 1.0;
        double r359582 = z;
        double r359583 = r359581 - r359582;
        double r359584 = log(r359582);
        double r359585 = r359583 + r359584;
        double r359586 = r359580 * r359585;
        double r359587 = r359579 + r359586;
        return r359587;
}

double f(double x, double y, double z) {
        double r359588 = x;
        double r359589 = 0.5;
        double r359590 = r359588 * r359589;
        double r359591 = y;
        double r359592 = 1.0;
        double r359593 = z;
        double r359594 = r359592 - r359593;
        double r359595 = r359591 * r359594;
        double r359596 = log(r359593);
        double r359597 = r359591 * r359596;
        double r359598 = r359595 + r359597;
        double r359599 = r359590 + r359598;
        return r359599;
}

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 distribute-lft-in0.1

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

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

Reproduce

herbie shell --seed 2020047 +o rules:numerics
(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)))))