Average Error: 9.9 → 0.3
Time: 24.6s
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)\right) + \log \left({y}^{\frac{1}{3}}\right) \cdot x\right) + \left(z \cdot \left(\log 1 - 1 \cdot y\right) - \frac{1}{2} \cdot \frac{z \cdot {y}^{2}}{{1}^{2}}\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)\right) + \log \left({y}^{\frac{1}{3}}\right) \cdot x\right) + \left(z \cdot \left(\log 1 - 1 \cdot y\right) - \frac{1}{2} \cdot \frac{z \cdot {y}^{2}}{{1}^{2}}\right)\right) - t
double f(double x, double y, double z, double t) {
        double r339209 = x;
        double r339210 = y;
        double r339211 = log(r339210);
        double r339212 = r339209 * r339211;
        double r339213 = z;
        double r339214 = 1.0;
        double r339215 = r339214 - r339210;
        double r339216 = log(r339215);
        double r339217 = r339213 * r339216;
        double r339218 = r339212 + r339217;
        double r339219 = t;
        double r339220 = r339218 - r339219;
        return r339220;
}

double f(double x, double y, double z, double t) {
        double r339221 = x;
        double r339222 = 2.0;
        double r339223 = y;
        double r339224 = cbrt(r339223);
        double r339225 = log(r339224);
        double r339226 = r339222 * r339225;
        double r339227 = r339221 * r339226;
        double r339228 = 0.3333333333333333;
        double r339229 = pow(r339223, r339228);
        double r339230 = log(r339229);
        double r339231 = r339230 * r339221;
        double r339232 = r339227 + r339231;
        double r339233 = z;
        double r339234 = 1.0;
        double r339235 = log(r339234);
        double r339236 = r339234 * r339223;
        double r339237 = r339235 - r339236;
        double r339238 = r339233 * r339237;
        double r339239 = 0.5;
        double r339240 = pow(r339223, r339222);
        double r339241 = r339233 * r339240;
        double r339242 = pow(r339234, r339222);
        double r339243 = r339241 / r339242;
        double r339244 = r339239 * r339243;
        double r339245 = r339238 - r339244;
        double r339246 = r339232 + r339245;
        double r339247 = t;
        double r339248 = r339246 - r339247;
        return r339248;
}

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.9
Target0.2
Herbie0.3
\[\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.9

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

    \[\leadsto \left(x \cdot \log y + \color{blue}{\left(z \cdot \left(\log 1 - 1 \cdot y\right) - \frac{1}{2} \cdot \frac{z \cdot {y}^{2}}{{1}^{2}}\right)}\right) - t\]
  4. Using strategy rm
  5. 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 \left(\log 1 - 1 \cdot y\right) - \frac{1}{2} \cdot \frac{z \cdot {y}^{2}}{{1}^{2}}\right)\right) - t\]
  6. 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 \left(\log 1 - 1 \cdot y\right) - \frac{1}{2} \cdot \frac{z \cdot {y}^{2}}{{1}^{2}}\right)\right) - t\]
  7. 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 \left(\log 1 - 1 \cdot y\right) - \frac{1}{2} \cdot \frac{z \cdot {y}^{2}}{{1}^{2}}\right)\right) - t\]
  8. 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 \left(\log 1 - 1 \cdot y\right) - \frac{1}{2} \cdot \frac{z \cdot {y}^{2}}{{1}^{2}}\right)\right) - t\]
  9. Simplified0.4

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

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

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

Reproduce

herbie shell --seed 2019303 
(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.333333333333333315 (* 1 (* 1 1))) (* y (* y y))))) (- t (* x (log y))))

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