Average Error: 9.1 → 0.4
Time: 18.8s
Precision: 64
\[\left(x \cdot \log y + z \cdot \log \left(1 - y\right)\right) - t\]
\[\left(\left(\log \left(\sqrt[3]{y}\right) \cdot 2\right) \cdot x + \left(\left(\log 1 - \left(0.5 \cdot y\right) \cdot y\right) - 1 \cdot y\right) \cdot z\right) + \left(\log \left(\sqrt[3]{y}\right) \cdot x - t\right)\]
\left(x \cdot \log y + z \cdot \log \left(1 - y\right)\right) - t
\left(\left(\log \left(\sqrt[3]{y}\right) \cdot 2\right) \cdot x + \left(\left(\log 1 - \left(0.5 \cdot y\right) \cdot y\right) - 1 \cdot y\right) \cdot z\right) + \left(\log \left(\sqrt[3]{y}\right) \cdot x - t\right)
double f(double x, double y, double z, double t) {
        double r320162 = x;
        double r320163 = y;
        double r320164 = log(r320163);
        double r320165 = r320162 * r320164;
        double r320166 = z;
        double r320167 = 1.0;
        double r320168 = r320167 - r320163;
        double r320169 = log(r320168);
        double r320170 = r320166 * r320169;
        double r320171 = r320165 + r320170;
        double r320172 = t;
        double r320173 = r320171 - r320172;
        return r320173;
}

double f(double x, double y, double z, double t) {
        double r320174 = y;
        double r320175 = cbrt(r320174);
        double r320176 = log(r320175);
        double r320177 = 2.0;
        double r320178 = r320176 * r320177;
        double r320179 = x;
        double r320180 = r320178 * r320179;
        double r320181 = 1.0;
        double r320182 = log(r320181);
        double r320183 = 0.5;
        double r320184 = r320183 * r320174;
        double r320185 = r320184 * r320174;
        double r320186 = r320182 - r320185;
        double r320187 = r320181 * r320174;
        double r320188 = r320186 - r320187;
        double r320189 = z;
        double r320190 = r320188 * r320189;
        double r320191 = r320180 + r320190;
        double r320192 = r320176 * r320179;
        double r320193 = t;
        double r320194 = r320192 - r320193;
        double r320195 = r320191 + r320194;
        return r320195;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original9.1
Target0.3
Herbie0.4
\[\left(-z\right) \cdot \left(\left(0.5 \cdot \left(y \cdot y\right) + y\right) + \frac{0.3333333333333333148296162562473909929395}{1 \cdot \left(1 \cdot 1\right)} \cdot \left(y \cdot \left(y \cdot y\right)\right)\right) - \left(t - x \cdot \log y\right)\]

Derivation

  1. Initial program 9.1

    \[\left(x \cdot \log y + z \cdot \log \left(1 - y\right)\right) - t\]
  2. Simplified9.1

    \[\leadsto \color{blue}{\log \left(1 - y\right) \cdot z + \left(x \cdot \log y - t\right)}\]
  3. Taylor expanded around 0 0.4

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

    \[\leadsto \color{blue}{\left(z \cdot \left(\log 1 - 1 \cdot y\right) - z \cdot \left({y}^{2} \cdot 0.5\right)\right)} + \left(x \cdot \log y - t\right)\]
  5. Taylor expanded around 0 0.4

    \[\leadsto \color{blue}{\left(\log 1 \cdot z - \left(0.5 \cdot \left(z \cdot {y}^{2}\right) + 1 \cdot \left(z \cdot y\right)\right)\right)} + \left(x \cdot \log y - t\right)\]
  6. Simplified0.4

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

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

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

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

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

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

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

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

Reproduce

herbie shell --seed 2019196 
(FPCore (x y z t)
  :name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, B"

  :herbie-target
  (- (* (- z) (+ (+ (* 0.5 (* y y)) y) (* (/ 0.3333333333333333 (* 1.0 (* 1.0 1.0))) (* y (* y y))))) (- t (* x (log y))))

  (- (+ (* x (log y)) (* z (log (- 1.0 y)))) t))