Average Error: 2.0 → 1.3
Time: 39.2s
Precision: 64
\[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
\[\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) \cdot \frac{1}{y}\]
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\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) \cdot \frac{1}{y}
double f(double x, double y, double z, double t, double a, double b) {
        double r93580 = x;
        double r93581 = y;
        double r93582 = z;
        double r93583 = log(r93582);
        double r93584 = r93581 * r93583;
        double r93585 = t;
        double r93586 = 1.0;
        double r93587 = r93585 - r93586;
        double r93588 = a;
        double r93589 = log(r93588);
        double r93590 = r93587 * r93589;
        double r93591 = r93584 + r93590;
        double r93592 = b;
        double r93593 = r93591 - r93592;
        double r93594 = exp(r93593);
        double r93595 = r93580 * r93594;
        double r93596 = r93595 / r93581;
        return r93596;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r93597 = x;
        double r93598 = a;
        double r93599 = 1.0;
        double r93600 = -r93599;
        double r93601 = pow(r93598, r93600);
        double r93602 = y;
        double r93603 = z;
        double r93604 = log(r93603);
        double r93605 = -r93604;
        double r93606 = log(r93598);
        double r93607 = -r93606;
        double r93608 = t;
        double r93609 = b;
        double r93610 = fma(r93607, r93608, r93609);
        double r93611 = fma(r93602, r93605, r93610);
        double r93612 = exp(r93611);
        double r93613 = r93601 / r93612;
        double r93614 = r93597 * r93613;
        double r93615 = 1.0;
        double r93616 = r93615 / r93602;
        double r93617 = r93614 * r93616;
        return r93617;
}

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 2.0

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

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

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

    \[\leadsto \color{blue}{\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) \cdot \frac{1}{y}}\]
  6. Final simplification1.3

    \[\leadsto \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) \cdot \frac{1}{y}\]

Reproduce

herbie shell --seed 2019235 +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))