Average Error: 0.1 → 0.1
Time: 15.5s
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 r174825 = x;
        double r174826 = 0.5;
        double r174827 = r174825 * r174826;
        double r174828 = y;
        double r174829 = 1.0;
        double r174830 = z;
        double r174831 = r174829 - r174830;
        double r174832 = log(r174830);
        double r174833 = r174831 + r174832;
        double r174834 = r174828 * r174833;
        double r174835 = r174827 + r174834;
        return r174835;
}

double f(double x, double y, double z) {
        double r174836 = x;
        double r174837 = 0.5;
        double r174838 = r174836 * r174837;
        double r174839 = y;
        double r174840 = 1.0;
        double r174841 = z;
        double r174842 = r174840 - r174841;
        double r174843 = r174839 * r174842;
        double r174844 = log(r174841);
        double r174845 = r174844 * r174839;
        double r174846 = r174843 + r174845;
        double r174847 = r174838 + r174846;
        return r174847;
}

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