Average Error: 1.9 → 1.5
Time: 31.6s
Precision: 64
\[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
\[{\left(\frac{1}{{a}^{1}}\right)}^{1} \cdot \frac{x}{e^{\mathsf{fma}\left(y, -\log z, \mathsf{fma}\left(-\log a, t, b\right)\right)} \cdot y}\]
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
{\left(\frac{1}{{a}^{1}}\right)}^{1} \cdot \frac{x}{e^{\mathsf{fma}\left(y, -\log z, \mathsf{fma}\left(-\log a, t, b\right)\right)} \cdot y}
double f(double x, double y, double z, double t, double a, double b) {
        double r59912 = x;
        double r59913 = y;
        double r59914 = z;
        double r59915 = log(r59914);
        double r59916 = r59913 * r59915;
        double r59917 = t;
        double r59918 = 1.0;
        double r59919 = r59917 - r59918;
        double r59920 = a;
        double r59921 = log(r59920);
        double r59922 = r59919 * r59921;
        double r59923 = r59916 + r59922;
        double r59924 = b;
        double r59925 = r59923 - r59924;
        double r59926 = exp(r59925);
        double r59927 = r59912 * r59926;
        double r59928 = r59927 / r59913;
        return r59928;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r59929 = 1.0;
        double r59930 = a;
        double r59931 = 1.0;
        double r59932 = pow(r59930, r59931);
        double r59933 = r59929 / r59932;
        double r59934 = pow(r59933, r59931);
        double r59935 = x;
        double r59936 = y;
        double r59937 = z;
        double r59938 = log(r59937);
        double r59939 = -r59938;
        double r59940 = log(r59930);
        double r59941 = -r59940;
        double r59942 = t;
        double r59943 = b;
        double r59944 = fma(r59941, r59942, r59943);
        double r59945 = fma(r59936, r59939, r59944);
        double r59946 = exp(r59945);
        double r59947 = r59946 * r59936;
        double r59948 = r59935 / r59947;
        double r59949 = r59934 * r59948;
        return r59949;
}

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

Derivation

  1. Initial program 1.9

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

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

    \[\leadsto \frac{x \cdot \color{blue}{\frac{{a}^{\left(-1\right)}}{e^{\mathsf{fma}\left(y, -\log z, \mathsf{fma}\left(-\log a, t, b\right)\right)}}}}{y}\]
  4. Using strategy rm
  5. Applied *-un-lft-identity1.2

    \[\leadsto \frac{\color{blue}{1 \cdot \left(x \cdot \frac{{a}^{\left(-1\right)}}{e^{\mathsf{fma}\left(y, -\log z, \mathsf{fma}\left(-\log a, t, b\right)\right)}}\right)}}{y}\]
  6. Using strategy rm
  7. Applied div-inv1.2

    \[\leadsto \color{blue}{\left(1 \cdot \left(x \cdot \frac{{a}^{\left(-1\right)}}{e^{\mathsf{fma}\left(y, -\log z, \mathsf{fma}\left(-\log a, t, b\right)\right)}}\right)\right) \cdot \frac{1}{y}}\]
  8. Taylor expanded around inf 1.5

    \[\leadsto \color{blue}{{\left(\frac{1}{{a}^{1}}\right)}^{1} \cdot \frac{x}{e^{\log \left(\frac{1}{z}\right) \cdot y + \left(\log \left(\frac{1}{a}\right) \cdot t + b\right)} \cdot y}}\]
  9. Simplified1.5

    \[\leadsto \color{blue}{{\left(\frac{1}{{a}^{1}}\right)}^{1} \cdot \frac{x}{e^{\mathsf{fma}\left(y, -\log z, \mathsf{fma}\left(-\log a, t, b\right)\right)} \cdot y}}\]
  10. Final simplification1.5

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

Reproduce

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