Average Error: 9.3 → 0.3
Time: 17.8s
Precision: 64
\[\left(x \cdot \log y + z \cdot \log \left(1 - y\right)\right) - t\]
\[\left(x \cdot \log y + z \cdot \left(\log 1 - \left(1 \cdot y + \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)\right)\right) - t\]
\left(x \cdot \log y + z \cdot \log \left(1 - y\right)\right) - t
\left(x \cdot \log y + z \cdot \left(\log 1 - \left(1 \cdot y + \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)\right)\right) - t
double f(double x, double y, double z, double t) {
        double r302372 = x;
        double r302373 = y;
        double r302374 = log(r302373);
        double r302375 = r302372 * r302374;
        double r302376 = z;
        double r302377 = 1.0;
        double r302378 = r302377 - r302373;
        double r302379 = log(r302378);
        double r302380 = r302376 * r302379;
        double r302381 = r302375 + r302380;
        double r302382 = t;
        double r302383 = r302381 - r302382;
        return r302383;
}

double f(double x, double y, double z, double t) {
        double r302384 = x;
        double r302385 = y;
        double r302386 = log(r302385);
        double r302387 = r302384 * r302386;
        double r302388 = z;
        double r302389 = 1.0;
        double r302390 = log(r302389);
        double r302391 = r302389 * r302385;
        double r302392 = 0.5;
        double r302393 = 2.0;
        double r302394 = pow(r302385, r302393);
        double r302395 = pow(r302389, r302393);
        double r302396 = r302394 / r302395;
        double r302397 = r302392 * r302396;
        double r302398 = r302391 + r302397;
        double r302399 = r302390 - r302398;
        double r302400 = r302388 * r302399;
        double r302401 = r302387 + r302400;
        double r302402 = t;
        double r302403 = r302401 - r302402;
        return r302403;
}

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.3
Target0.3
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.3

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

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

Reproduce

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