Average Error: 0.1 → 0.1
Time: 14.6s
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) + \log z \cdot y\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) + \log z \cdot y\right)
double f(double x, double y, double z) {
        double r175838 = x;
        double r175839 = 0.5;
        double r175840 = r175838 * r175839;
        double r175841 = y;
        double r175842 = 1.0;
        double r175843 = z;
        double r175844 = r175842 - r175843;
        double r175845 = log(r175843);
        double r175846 = r175844 + r175845;
        double r175847 = r175841 * r175846;
        double r175848 = r175840 + r175847;
        return r175848;
}

double f(double x, double y, double z) {
        double r175849 = x;
        double r175850 = 0.5;
        double r175851 = r175849 * r175850;
        double r175852 = y;
        double r175853 = 1.0;
        double r175854 = z;
        double r175855 = r175853 - r175854;
        double r175856 = r175852 * r175855;
        double r175857 = log(r175854);
        double r175858 = r175857 * r175852;
        double r175859 = r175856 + r175858;
        double r175860 = r175851 + r175859;
        return r175860;
}

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(y \cdot \left(1 - z\right) + \color{blue}{\log z \cdot y}\right)\]
  5. Final simplification0.1

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

Reproduce

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