Average Error: 9.2 → 0.4
Time: 8.6s
Precision: 64
\[\left(x \cdot \log y + z \cdot \log \left(1 - y\right)\right) - t\]
\[\left(x \cdot \log \left({\left({y}^{\frac{2}{3}}\right)}^{1}\right) + \left(\log \left(\sqrt[3]{y}\right) \cdot x + z \cdot \left(\log 1 - \left(1 \cdot y + \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)\right)\right)\right) - t\]
\left(x \cdot \log y + z \cdot \log \left(1 - y\right)\right) - t
\left(x \cdot \log \left({\left({y}^{\frac{2}{3}}\right)}^{1}\right) + \left(\log \left(\sqrt[3]{y}\right) \cdot x + z \cdot \left(\log 1 - \left(1 \cdot y + \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)\right)\right)\right) - t
double f(double x, double y, double z, double t) {
        double r366040 = x;
        double r366041 = y;
        double r366042 = log(r366041);
        double r366043 = r366040 * r366042;
        double r366044 = z;
        double r366045 = 1.0;
        double r366046 = r366045 - r366041;
        double r366047 = log(r366046);
        double r366048 = r366044 * r366047;
        double r366049 = r366043 + r366048;
        double r366050 = t;
        double r366051 = r366049 - r366050;
        return r366051;
}

double f(double x, double y, double z, double t) {
        double r366052 = x;
        double r366053 = y;
        double r366054 = 0.6666666666666666;
        double r366055 = pow(r366053, r366054);
        double r366056 = 1.0;
        double r366057 = pow(r366055, r366056);
        double r366058 = log(r366057);
        double r366059 = r366052 * r366058;
        double r366060 = cbrt(r366053);
        double r366061 = log(r366060);
        double r366062 = r366061 * r366052;
        double r366063 = z;
        double r366064 = 1.0;
        double r366065 = log(r366064);
        double r366066 = r366064 * r366053;
        double r366067 = 0.5;
        double r366068 = 2.0;
        double r366069 = pow(r366053, r366068);
        double r366070 = pow(r366064, r366068);
        double r366071 = r366069 / r366070;
        double r366072 = r366067 * r366071;
        double r366073 = r366066 + r366072;
        double r366074 = r366065 - r366073;
        double r366075 = r366063 * r366074;
        double r366076 = r366062 + r366075;
        double r366077 = r366059 + r366076;
        double r366078 = t;
        double r366079 = r366077 - r366078;
        return r366079;
}

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

    \[\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 + z \cdot \color{blue}{\left(\log 1 - \left(1 \cdot y + \frac{1}{2} \cdot \frac{{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)} + z \cdot \left(\log 1 - \left(1 \cdot y + \frac{1}{2} \cdot \frac{{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)} + z \cdot \left(\log 1 - \left(1 \cdot y + \frac{1}{2} \cdot \frac{{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)} + z \cdot \left(\log 1 - \left(1 \cdot y + \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)\right)\right) - t\]
  7. Applied associate-+l+0.4

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

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

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

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

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

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

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

Reproduce

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