Average Error: 9.4 → 0.4
Time: 7.6s
Precision: 64
\[\left(x \cdot \log y + z \cdot \log \left(1 - y\right)\right) - t\]
\[\left(\log \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot x + \left(\log \left(\sqrt[3]{y}\right) \cdot x + \left(z \cdot \log 1 - \left(1 \cdot \left(z \cdot y\right) + \frac{1}{2} \cdot \frac{z \cdot {y}^{2}}{{1}^{2}}\right)\right)\right)\right) - t\]
\left(x \cdot \log y + z \cdot \log \left(1 - y\right)\right) - t
\left(\log \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot x + \left(\log \left(\sqrt[3]{y}\right) \cdot x + \left(z \cdot \log 1 - \left(1 \cdot \left(z \cdot y\right) + \frac{1}{2} \cdot \frac{z \cdot {y}^{2}}{{1}^{2}}\right)\right)\right)\right) - t
double f(double x, double y, double z, double t) {
        double r536383 = x;
        double r536384 = y;
        double r536385 = log(r536384);
        double r536386 = r536383 * r536385;
        double r536387 = z;
        double r536388 = 1.0;
        double r536389 = r536388 - r536384;
        double r536390 = log(r536389);
        double r536391 = r536387 * r536390;
        double r536392 = r536386 + r536391;
        double r536393 = t;
        double r536394 = r536392 - r536393;
        return r536394;
}

double f(double x, double y, double z, double t) {
        double r536395 = y;
        double r536396 = cbrt(r536395);
        double r536397 = r536396 * r536396;
        double r536398 = log(r536397);
        double r536399 = x;
        double r536400 = r536398 * r536399;
        double r536401 = log(r536396);
        double r536402 = r536401 * r536399;
        double r536403 = z;
        double r536404 = 1.0;
        double r536405 = log(r536404);
        double r536406 = r536403 * r536405;
        double r536407 = r536403 * r536395;
        double r536408 = r536404 * r536407;
        double r536409 = 0.5;
        double r536410 = 2.0;
        double r536411 = pow(r536395, r536410);
        double r536412 = r536403 * r536411;
        double r536413 = pow(r536404, r536410);
        double r536414 = r536412 / r536413;
        double r536415 = r536409 * r536414;
        double r536416 = r536408 + r536415;
        double r536417 = r536406 - r536416;
        double r536418 = r536402 + r536417;
        double r536419 = r536400 + r536418;
        double r536420 = t;
        double r536421 = r536419 - r536420;
        return r536421;
}

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.4
Target0.3
Herbie0.4
\[\left(-z\right) \cdot \left(\left(0.5 \cdot \left(y \cdot y\right) + y\right) + \frac{0.333333333333333315}{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.4

    \[\left(x \cdot \log y + z \cdot \log \left(1 - y\right)\right) - t\]
  2. Taylor expanded around 0 0.4

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

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

    \[\leadsto \left(x \cdot \color{blue}{\left(\log \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) + \log \left(\sqrt[3]{y}\right)\right)} + \left(z \cdot \log 1 - \left(1 \cdot \left(z \cdot y\right) + \frac{1}{2} \cdot \frac{z \cdot {y}^{2}}{{1}^{2}}\right)\right)\right) - t\]
  6. Applied distribute-rgt-in0.4

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

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

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

Reproduce

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

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

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