Average Error: 1.9 → 1.3
Time: 16.7s
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^{\log \left(\frac{1}{z}\right) \cdot y + \left(\log \left(\frac{1}{a}\right) \cdot t + b\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^{\log \left(\frac{1}{z}\right) \cdot y + \left(\log \left(\frac{1}{a}\right) \cdot t + b\right)} \cdot y}
double f(double x, double y, double z, double t, double a, double b) {
        double r375212 = x;
        double r375213 = y;
        double r375214 = z;
        double r375215 = log(r375214);
        double r375216 = r375213 * r375215;
        double r375217 = t;
        double r375218 = 1.0;
        double r375219 = r375217 - r375218;
        double r375220 = a;
        double r375221 = log(r375220);
        double r375222 = r375219 * r375221;
        double r375223 = r375216 + r375222;
        double r375224 = b;
        double r375225 = r375223 - r375224;
        double r375226 = exp(r375225);
        double r375227 = r375212 * r375226;
        double r375228 = r375227 / r375213;
        return r375228;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r375229 = 1.0;
        double r375230 = a;
        double r375231 = 1.0;
        double r375232 = pow(r375230, r375231);
        double r375233 = r375229 / r375232;
        double r375234 = pow(r375233, r375231);
        double r375235 = x;
        double r375236 = z;
        double r375237 = r375229 / r375236;
        double r375238 = log(r375237);
        double r375239 = y;
        double r375240 = r375238 * r375239;
        double r375241 = r375229 / r375230;
        double r375242 = log(r375241);
        double r375243 = t;
        double r375244 = r375242 * r375243;
        double r375245 = b;
        double r375246 = r375244 + r375245;
        double r375247 = r375240 + r375246;
        double r375248 = exp(r375247);
        double r375249 = r375248 * r375239;
        double r375250 = r375235 / r375249;
        double r375251 = r375234 * r375250;
        return r375251;
}

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

Target

Original1.9
Target10.4
Herbie1.3
\[\begin{array}{l} \mathbf{if}\;t \lt -0.8845848504127471478852839936735108494759:\\ \;\;\;\;\frac{x \cdot \frac{{a}^{\left(t - 1\right)}}{y}}{\left(b + 1\right) - y \cdot \log z}\\ \mathbf{elif}\;t \lt 852031.228837407310493290424346923828125:\\ \;\;\;\;\frac{\frac{x}{y} \cdot {a}^{\left(t - 1\right)}}{e^{b - \log z \cdot y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \frac{{a}^{\left(t - 1\right)}}{y}}{\left(b + 1\right) - y \cdot \log z}\\ \end{array}\]

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.1

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

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

    \[\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}}\]
  7. Final simplification1.3

    \[\leadsto {\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}\]

Reproduce

herbie shell --seed 2020001 +o rules:numerics
(FPCore (x y z t a b)
  :name "Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2, A"
  :precision binary64

  :herbie-target
  (if (< t -0.8845848504127471) (/ (* x (/ (pow a (- t 1)) y)) (- (+ b 1) (* y (log z)))) (if (< t 852031.2288374073) (/ (* (/ x y) (pow a (- t 1))) (exp (- b (* (log z) y)))) (/ (* x (/ (pow a (- t 1)) y)) (- (+ b 1) (* y (log z))))))

  (/ (* x (exp (- (+ (* y (log z)) (* (- t 1) (log a))) b))) y))