Average Error: 0.1 → 0.1
Time: 6.2s
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 r275826 = x;
        double r275827 = 0.5;
        double r275828 = r275826 * r275827;
        double r275829 = y;
        double r275830 = 1.0;
        double r275831 = z;
        double r275832 = r275830 - r275831;
        double r275833 = log(r275831);
        double r275834 = r275832 + r275833;
        double r275835 = r275829 * r275834;
        double r275836 = r275828 + r275835;
        return r275836;
}

double f(double x, double y, double z) {
        double r275837 = x;
        double r275838 = 0.5;
        double r275839 = r275837 * r275838;
        double r275840 = y;
        double r275841 = 1.0;
        double r275842 = z;
        double r275843 = r275841 - r275842;
        double r275844 = r275840 * r275843;
        double r275845 = log(r275842);
        double r275846 = r275840 * r275845;
        double r275847 = r275844 + r275846;
        double r275848 = r275839 + r275847;
        return r275848;
}

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