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(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 r290882 = x;
        double r290883 = 0.5;
        double r290884 = r290882 * r290883;
        double r290885 = y;
        double r290886 = 1.0;
        double r290887 = z;
        double r290888 = r290886 - r290887;
        double r290889 = log(r290887);
        double r290890 = r290888 + r290889;
        double r290891 = r290885 * r290890;
        double r290892 = r290884 + r290891;
        return r290892;
}

double f(double x, double y, double z) {
        double r290893 = x;
        double r290894 = 0.5;
        double r290895 = r290893 * r290894;
        double r290896 = y;
        double r290897 = 1.0;
        double r290898 = z;
        double r290899 = r290897 - r290898;
        double r290900 = r290896 * r290899;
        double r290901 = log(r290898);
        double r290902 = r290896 * r290901;
        double r290903 = r290900 + r290902;
        double r290904 = r290895 + r290903;
        return r290904;
}

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