Average Error: 2.1 → 0.6
Time: 25.3s
Precision: 64
\[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}\]
\[x \cdot e^{y \cdot \left(\log z - t\right) + \left(a \cdot \left(\log 1 - b\right) - 1 \cdot \left(a \cdot z\right)\right)}\]
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
x \cdot e^{y \cdot \left(\log z - t\right) + \left(a \cdot \left(\log 1 - b\right) - 1 \cdot \left(a \cdot z\right)\right)}
double f(double x, double y, double z, double t, double a, double b) {
        double r93992 = x;
        double r93993 = y;
        double r93994 = z;
        double r93995 = log(r93994);
        double r93996 = t;
        double r93997 = r93995 - r93996;
        double r93998 = r93993 * r93997;
        double r93999 = a;
        double r94000 = 1.0;
        double r94001 = r94000 - r93994;
        double r94002 = log(r94001);
        double r94003 = b;
        double r94004 = r94002 - r94003;
        double r94005 = r93999 * r94004;
        double r94006 = r93998 + r94005;
        double r94007 = exp(r94006);
        double r94008 = r93992 * r94007;
        return r94008;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r94009 = x;
        double r94010 = y;
        double r94011 = z;
        double r94012 = log(r94011);
        double r94013 = t;
        double r94014 = r94012 - r94013;
        double r94015 = r94010 * r94014;
        double r94016 = a;
        double r94017 = 1.0;
        double r94018 = log(r94017);
        double r94019 = b;
        double r94020 = r94018 - r94019;
        double r94021 = r94016 * r94020;
        double r94022 = r94016 * r94011;
        double r94023 = r94017 * r94022;
        double r94024 = r94021 - r94023;
        double r94025 = r94015 + r94024;
        double r94026 = exp(r94025);
        double r94027 = r94009 * r94026;
        return r94027;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Bits error versus b

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 2.1

    \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}\]
  2. Taylor expanded around 0 0.6

    \[\leadsto x \cdot e^{y \cdot \left(\log z - t\right) + \color{blue}{\left(a \cdot \log 1 - \left(a \cdot b + 1 \cdot \left(a \cdot z\right)\right)\right)}}\]
  3. Simplified0.6

    \[\leadsto x \cdot e^{y \cdot \left(\log z - t\right) + \color{blue}{\left(a \cdot \left(\log 1 - b\right) - 1 \cdot \left(a \cdot z\right)\right)}}\]
  4. Final simplification0.6

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

Reproduce

herbie shell --seed 2019326 +o rules:numerics
(FPCore (x y z t a b)
  :name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, B"
  :precision binary64
  (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1 z)) b))))))