Average Error: 0.1 → 0.1
Time: 21.0s
Precision: 64
\[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z\]
\[x - \left(\log y \cdot \left(y + 0.5\right) - \left(y - z\right)\right)\]
\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
x - \left(\log y \cdot \left(y + 0.5\right) - \left(y - z\right)\right)
double f(double x, double y, double z) {
        double r292736 = x;
        double r292737 = y;
        double r292738 = 0.5;
        double r292739 = r292737 + r292738;
        double r292740 = log(r292737);
        double r292741 = r292739 * r292740;
        double r292742 = r292736 - r292741;
        double r292743 = r292742 + r292737;
        double r292744 = z;
        double r292745 = r292743 - r292744;
        return r292745;
}

double f(double x, double y, double z) {
        double r292746 = x;
        double r292747 = y;
        double r292748 = log(r292747);
        double r292749 = 0.5;
        double r292750 = r292747 + r292749;
        double r292751 = r292748 * r292750;
        double r292752 = z;
        double r292753 = r292747 - r292752;
        double r292754 = r292751 - r292753;
        double r292755 = r292746 - r292754;
        return r292755;
}

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(\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 add-cube-cbrt0.1

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

    \[\leadsto \left(\left(x - \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)}\right) + y\right) - z\]
  5. Applied distribute-lft-in0.2

    \[\leadsto \left(\left(x - \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)}\right) + y\right) - z\]
  6. Simplified0.2

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

    \[\leadsto \left(\left(x - \left(\left(y + 0.5\right) \cdot \left(2 \cdot \log \left(\sqrt[3]{y}\right)\right) + \color{blue}{\log \left(\sqrt[3]{y}\right) \cdot \left(y + 0.5\right)}\right)\right) + y\right) - z\]
  8. Taylor expanded around 0 0.2

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

    \[\leadsto \left(\left(x - \color{blue}{\log \left({y}^{\frac{1}{3}}\right) \cdot \left(1.5 + 3 \cdot y\right)}\right) + y\right) - z\]
  10. Taylor expanded around -inf 64.0

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

    \[\leadsto \left(\left(x - \color{blue}{\left(y + 0.5\right) \cdot \left(0 + \log y\right)}\right) + y\right) - z\]
  12. Final simplification0.1

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

Reproduce

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

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

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