Average Error: 0.1 → 0.1
Time: 9.9s
Precision: 64
\[x \cdot 0.5 + y \cdot \left(\left(1 - z\right) + \log z\right)\]
\[x \cdot 0.5 + \left(\left(1 - z\right) \cdot y + y \cdot \log z\right)\]
x \cdot 0.5 + y \cdot \left(\left(1 - z\right) + \log z\right)
x \cdot 0.5 + \left(\left(1 - z\right) \cdot y + y \cdot \log z\right)
double f(double x, double y, double z) {
        double r387184 = x;
        double r387185 = 0.5;
        double r387186 = r387184 * r387185;
        double r387187 = y;
        double r387188 = 1.0;
        double r387189 = z;
        double r387190 = r387188 - r387189;
        double r387191 = log(r387189);
        double r387192 = r387190 + r387191;
        double r387193 = r387187 * r387192;
        double r387194 = r387186 + r387193;
        return r387194;
}

double f(double x, double y, double z) {
        double r387195 = x;
        double r387196 = 0.5;
        double r387197 = r387195 * r387196;
        double r387198 = 1.0;
        double r387199 = z;
        double r387200 = r387198 - r387199;
        double r387201 = y;
        double r387202 = r387200 * r387201;
        double r387203 = log(r387199);
        double r387204 = r387201 * r387203;
        double r387205 = r387202 + r387204;
        double r387206 = r387197 + r387205;
        return r387206;
}

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. Simplified0.1

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

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

Reproduce

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