Average Error: 9.5 → 0.4
Time: 8.0s
Precision: 64
\[\left(x \cdot \log y + z \cdot \log \left(1 - y\right)\right) - t\]
\[\left(\left(x \cdot \left(2 \cdot \log \left(\sqrt[3]{y}\right) + \log \left(\sqrt[3]{\sqrt[3]{y} \cdot \sqrt[3]{y}}\right)\right) + \log \left(\sqrt[3]{\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\]
\left(x \cdot \log y + z \cdot \log \left(1 - y\right)\right) - t
\left(\left(x \cdot \left(2 \cdot \log \left(\sqrt[3]{y}\right) + \log \left(\sqrt[3]{\sqrt[3]{y} \cdot \sqrt[3]{y}}\right)\right) + \log \left(\sqrt[3]{\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
double f(double x, double y, double z, double t) {
        double r664345 = x;
        double r664346 = y;
        double r664347 = log(r664346);
        double r664348 = r664345 * r664347;
        double r664349 = z;
        double r664350 = 1.0;
        double r664351 = r664350 - r664346;
        double r664352 = log(r664351);
        double r664353 = r664349 * r664352;
        double r664354 = r664348 + r664353;
        double r664355 = t;
        double r664356 = r664354 - r664355;
        return r664356;
}

double f(double x, double y, double z, double t) {
        double r664357 = x;
        double r664358 = 2.0;
        double r664359 = y;
        double r664360 = cbrt(r664359);
        double r664361 = log(r664360);
        double r664362 = r664358 * r664361;
        double r664363 = r664360 * r664360;
        double r664364 = cbrt(r664363);
        double r664365 = log(r664364);
        double r664366 = r664362 + r664365;
        double r664367 = r664357 * r664366;
        double r664368 = cbrt(r664360);
        double r664369 = log(r664368);
        double r664370 = r664369 * r664357;
        double r664371 = r664367 + r664370;
        double r664372 = z;
        double r664373 = 1.0;
        double r664374 = log(r664373);
        double r664375 = r664372 * r664374;
        double r664376 = r664372 * r664359;
        double r664377 = r664373 * r664376;
        double r664378 = 0.5;
        double r664379 = pow(r664359, r664358);
        double r664380 = r664372 * r664379;
        double r664381 = pow(r664373, r664358);
        double r664382 = r664380 / r664381;
        double r664383 = r664378 * r664382;
        double r664384 = r664377 + r664383;
        double r664385 = r664375 - r664384;
        double r664386 = r664371 + r664385;
        double r664387 = t;
        double r664388 = r664386 - r664387;
        return r664388;
}

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.5
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.5

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

    \[\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.3

    \[\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-lft-in0.4

    \[\leadsto \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)} + \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. Simplified0.4

    \[\leadsto \left(\left(\color{blue}{x \cdot \left(2 \cdot \log \left(\sqrt[3]{y}\right)\right)} + x \cdot \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\]
  8. Using strategy rm
  9. Applied add-cube-cbrt0.4

    \[\leadsto \left(\left(x \cdot \left(2 \cdot \log \left(\sqrt[3]{y}\right)\right) + x \cdot \log \left(\sqrt[3]{\color{blue}{\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \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\]
  10. Applied cbrt-prod0.4

    \[\leadsto \left(\left(x \cdot \left(2 \cdot \log \left(\sqrt[3]{y}\right)\right) + x \cdot \log \color{blue}{\left(\sqrt[3]{\sqrt[3]{y} \cdot \sqrt[3]{y}} \cdot \sqrt[3]{\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\]
  11. Applied log-prod0.4

    \[\leadsto \left(\left(x \cdot \left(2 \cdot \log \left(\sqrt[3]{y}\right)\right) + x \cdot \color{blue}{\left(\log \left(\sqrt[3]{\sqrt[3]{y} \cdot \sqrt[3]{y}}\right) + \log \left(\sqrt[3]{\sqrt[3]{y}}\right)\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\]
  12. Applied distribute-rgt-in0.3

    \[\leadsto \left(\left(x \cdot \left(2 \cdot \log \left(\sqrt[3]{y}\right)\right) + \color{blue}{\left(\log \left(\sqrt[3]{\sqrt[3]{y} \cdot \sqrt[3]{y}}\right) \cdot x + \log \left(\sqrt[3]{\sqrt[3]{y}}\right) \cdot x\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\]
  13. Applied associate-+r+0.3

    \[\leadsto \left(\color{blue}{\left(\left(x \cdot \left(2 \cdot \log \left(\sqrt[3]{y}\right)\right) + \log \left(\sqrt[3]{\sqrt[3]{y} \cdot \sqrt[3]{y}}\right) \cdot x\right) + \log \left(\sqrt[3]{\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\]
  14. Simplified0.4

    \[\leadsto \left(\left(\color{blue}{x \cdot \left(2 \cdot \log \left(\sqrt[3]{y}\right) + \log \left(\sqrt[3]{\sqrt[3]{y} \cdot \sqrt[3]{y}}\right)\right)} + \log \left(\sqrt[3]{\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\]
  15. Final simplification0.4

    \[\leadsto \left(\left(x \cdot \left(2 \cdot \log \left(\sqrt[3]{y}\right) + \log \left(\sqrt[3]{\sqrt[3]{y} \cdot \sqrt[3]{y}}\right)\right) + \log \left(\sqrt[3]{\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\]

Reproduce

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