Average Error: 0.1 → 0.2
Time: 20.9s
Precision: 64
\[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z\]
\[\left(x - \left(\log \left({y}^{\frac{2}{3}}\right) \cdot \left(y + 0.5\right) + \left(\left(y + 0.5\right) \cdot \log \left(\sqrt[3]{y}\right) - y\right)\right)\right) - z\]
\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
\left(x - \left(\log \left({y}^{\frac{2}{3}}\right) \cdot \left(y + 0.5\right) + \left(\left(y + 0.5\right) \cdot \log \left(\sqrt[3]{y}\right) - y\right)\right)\right) - z
double f(double x, double y, double z) {
        double r16596243 = x;
        double r16596244 = y;
        double r16596245 = 0.5;
        double r16596246 = r16596244 + r16596245;
        double r16596247 = log(r16596244);
        double r16596248 = r16596246 * r16596247;
        double r16596249 = r16596243 - r16596248;
        double r16596250 = r16596249 + r16596244;
        double r16596251 = z;
        double r16596252 = r16596250 - r16596251;
        return r16596252;
}

double f(double x, double y, double z) {
        double r16596253 = x;
        double r16596254 = y;
        double r16596255 = 0.6666666666666666;
        double r16596256 = pow(r16596254, r16596255);
        double r16596257 = log(r16596256);
        double r16596258 = 0.5;
        double r16596259 = r16596254 + r16596258;
        double r16596260 = r16596257 * r16596259;
        double r16596261 = cbrt(r16596254);
        double r16596262 = log(r16596261);
        double r16596263 = r16596259 * r16596262;
        double r16596264 = r16596263 - r16596254;
        double r16596265 = r16596260 + r16596264;
        double r16596266 = r16596253 - r16596265;
        double r16596267 = z;
        double r16596268 = r16596266 - r16596267;
        return r16596268;
}

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.2
\[\left(\left(y + x\right) - z\right) - \left(y + 0.5\right) \cdot \log y\]

Derivation

  1. Initial program 0.1

    \[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z\]
  2. Using strategy rm
  3. Applied associate-+l-0.1

    \[\leadsto \color{blue}{\left(x - \left(\left(y + 0.5\right) \cdot \log y - y\right)\right)} - z\]
  4. Using strategy rm
  5. Applied add-cube-cbrt0.1

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

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

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

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

    \[\leadsto \left(x - \left(\left(y + 0.5\right) \cdot \log \left(\sqrt[3]{y} \cdot \color{blue}{{y}^{\frac{1}{3}}}\right) + \left(\left(y + 0.5\right) \cdot \log \left(\sqrt[3]{y}\right) - y\right)\right)\right) - z\]
  11. Applied pow1/30.2

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

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

    \[\leadsto \left(x - \left(\left(y + 0.5\right) \cdot \log \left({y}^{\color{blue}{\frac{2}{3}}}\right) + \left(\left(y + 0.5\right) \cdot \log \left(\sqrt[3]{y}\right) - y\right)\right)\right) - z\]
  14. Using strategy rm
  15. Applied +-commutative0.2

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

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

Reproduce

herbie shell --seed 2019179 
(FPCore (x y z)
  :name "Numeric.SpecFunctions:stirlingError from math-functions-0.1.5.2"

  :herbie-target
  (- (- (+ y x) z) (* (+ y 0.5) (log y)))

  (- (+ (- x (* (+ y 0.5) (log y))) y) z))