Average Error: 0.1 → 0.1
Time: 4.4s
Precision: 64
\[x \cdot 0.5 + y \cdot \left(\left(1 - z\right) + \log z\right)\]
\[x \cdot 0.5 + \left(\left(1 - \left(z - 2 \cdot \log \left(\sqrt[3]{z}\right)\right)\right) \cdot y + \frac{1}{3} \cdot \left(\log z \cdot y\right)\right)\]
x \cdot 0.5 + y \cdot \left(\left(1 - z\right) + \log z\right)
x \cdot 0.5 + \left(\left(1 - \left(z - 2 \cdot \log \left(\sqrt[3]{z}\right)\right)\right) \cdot y + \frac{1}{3} \cdot \left(\log z \cdot y\right)\right)
double f(double x, double y, double z) {
        double r407007 = x;
        double r407008 = 0.5;
        double r407009 = r407007 * r407008;
        double r407010 = y;
        double r407011 = 1.0;
        double r407012 = z;
        double r407013 = r407011 - r407012;
        double r407014 = log(r407012);
        double r407015 = r407013 + r407014;
        double r407016 = r407010 * r407015;
        double r407017 = r407009 + r407016;
        return r407017;
}

double f(double x, double y, double z) {
        double r407018 = x;
        double r407019 = 0.5;
        double r407020 = r407018 * r407019;
        double r407021 = 1.0;
        double r407022 = z;
        double r407023 = 2.0;
        double r407024 = cbrt(r407022);
        double r407025 = log(r407024);
        double r407026 = r407023 * r407025;
        double r407027 = r407022 - r407026;
        double r407028 = r407021 - r407027;
        double r407029 = y;
        double r407030 = r407028 * r407029;
        double r407031 = 0.3333333333333333;
        double r407032 = log(r407022);
        double r407033 = r407032 * r407029;
        double r407034 = r407031 * r407033;
        double r407035 = r407030 + r407034;
        double r407036 = r407020 + r407035;
        return r407036;
}

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. Using strategy rm
  5. Applied add-cube-cbrt0.1

    \[\leadsto x \cdot 0.5 + \left(y \cdot \left(1 - z\right) + y \cdot \log \color{blue}{\left(\left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) \cdot \sqrt[3]{z}\right)}\right)\]
  6. Applied log-prod0.1

    \[\leadsto x \cdot 0.5 + \left(y \cdot \left(1 - z\right) + y \cdot \color{blue}{\left(\log \left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) + \log \left(\sqrt[3]{z}\right)\right)}\right)\]
  7. Applied distribute-rgt-in0.1

    \[\leadsto x \cdot 0.5 + \left(y \cdot \left(1 - z\right) + \color{blue}{\left(\log \left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) \cdot y + \log \left(\sqrt[3]{z}\right) \cdot y\right)}\right)\]
  8. Applied associate-+r+0.1

    \[\leadsto x \cdot 0.5 + \color{blue}{\left(\left(y \cdot \left(1 - z\right) + \log \left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) \cdot y\right) + \log \left(\sqrt[3]{z}\right) \cdot y\right)}\]
  9. Simplified0.1

    \[\leadsto x \cdot 0.5 + \left(\color{blue}{\left(1 - \left(z - 2 \cdot \log \left(\sqrt[3]{z}\right)\right)\right) \cdot y} + \log \left(\sqrt[3]{z}\right) \cdot y\right)\]
  10. Using strategy rm
  11. Applied pow1/30.1

    \[\leadsto x \cdot 0.5 + \left(\left(1 - \left(z - 2 \cdot \log \left(\sqrt[3]{z}\right)\right)\right) \cdot y + \log \color{blue}{\left({z}^{\frac{1}{3}}\right)} \cdot y\right)\]
  12. Applied log-pow0.1

    \[\leadsto x \cdot 0.5 + \left(\left(1 - \left(z - 2 \cdot \log \left(\sqrt[3]{z}\right)\right)\right) \cdot y + \color{blue}{\left(\frac{1}{3} \cdot \log z\right)} \cdot y\right)\]
  13. Applied associate-*l*0.1

    \[\leadsto x \cdot 0.5 + \left(\left(1 - \left(z - 2 \cdot \log \left(\sqrt[3]{z}\right)\right)\right) \cdot y + \color{blue}{\frac{1}{3} \cdot \left(\log z \cdot y\right)}\right)\]
  14. Final simplification0.1

    \[\leadsto x \cdot 0.5 + \left(\left(1 - \left(z - 2 \cdot \log \left(\sqrt[3]{z}\right)\right)\right) \cdot y + \frac{1}{3} \cdot \left(\log z \cdot y\right)\right)\]

Reproduce

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