Average Error: 0.1 → 0.1
Time: 7.0s
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 r1298 = x;
        double r1299 = 0.5;
        double r1300 = r1298 * r1299;
        double r1301 = y;
        double r1302 = 1.0;
        double r1303 = z;
        double r1304 = r1302 - r1303;
        double r1305 = log(r1303);
        double r1306 = r1304 + r1305;
        double r1307 = r1301 * r1306;
        double r1308 = r1300 + r1307;
        return r1308;
}

double f(double x, double y, double z) {
        double r1309 = x;
        double r1310 = 0.5;
        double r1311 = r1309 * r1310;
        double r1312 = y;
        double r1313 = 1.0;
        double r1314 = z;
        double r1315 = r1313 - r1314;
        double r1316 = r1312 * r1315;
        double r1317 = log(r1314);
        double r1318 = r1312 * r1317;
        double r1319 = r1316 + r1318;
        double r1320 = r1311 + r1319;
        return r1320;
}

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 2020025 +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)))))