Average Error: 0.1 → 0.1
Time: 8.5s
Precision: 64
\[x \cdot 0.5 + y \cdot \left(\left(1 - z\right) + \log z\right)\]
\[\left(x \cdot 0.5 + \left(1 - z\right) \cdot y\right) + \log z \cdot y\]
x \cdot 0.5 + y \cdot \left(\left(1 - z\right) + \log z\right)
\left(x \cdot 0.5 + \left(1 - z\right) \cdot y\right) + \log z \cdot y
double f(double x, double y, double z) {
        double r326526 = x;
        double r326527 = 0.5;
        double r326528 = r326526 * r326527;
        double r326529 = y;
        double r326530 = 1.0;
        double r326531 = z;
        double r326532 = r326530 - r326531;
        double r326533 = log(r326531);
        double r326534 = r326532 + r326533;
        double r326535 = r326529 * r326534;
        double r326536 = r326528 + r326535;
        return r326536;
}

double f(double x, double y, double z) {
        double r326537 = x;
        double r326538 = 0.5;
        double r326539 = r326537 * r326538;
        double r326540 = 1.0;
        double r326541 = z;
        double r326542 = r326540 - r326541;
        double r326543 = y;
        double r326544 = r326542 * r326543;
        double r326545 = r326539 + r326544;
        double r326546 = log(r326541);
        double r326547 = r326546 * r326543;
        double r326548 = r326545 + r326547;
        return r326548;
}

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-rgt-in0.1

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

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

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

Reproduce

herbie shell --seed 2020042 
(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)))))