Average Error: 1.9 → 1.3
Time: 17.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^{\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 r414439 = x;
        double r414440 = y;
        double r414441 = z;
        double r414442 = log(r414441);
        double r414443 = r414440 * r414442;
        double r414444 = t;
        double r414445 = 1.0;
        double r414446 = r414444 - r414445;
        double r414447 = a;
        double r414448 = log(r414447);
        double r414449 = r414446 * r414448;
        double r414450 = r414443 + r414449;
        double r414451 = b;
        double r414452 = r414450 - r414451;
        double r414453 = exp(r414452);
        double r414454 = r414439 * r414453;
        double r414455 = r414454 / r414440;
        return r414455;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r414456 = 1.0;
        double r414457 = a;
        double r414458 = 1.0;
        double r414459 = pow(r414457, r414458);
        double r414460 = r414456 / r414459;
        double r414461 = pow(r414460, r414458);
        double r414462 = x;
        double r414463 = z;
        double r414464 = r414456 / r414463;
        double r414465 = log(r414464);
        double r414466 = y;
        double r414467 = r414465 * r414466;
        double r414468 = r414456 / r414457;
        double r414469 = log(r414468);
        double r414470 = t;
        double r414471 = r414469 * r414470;
        double r414472 = b;
        double r414473 = r414471 + r414472;
        double r414474 = r414467 + r414473;
        double r414475 = exp(r414474);
        double r414476 = r414475 * r414466;
        double r414477 = r414462 / r414476;
        double r414478 = r414461 * r414477;
        return r414478;
}

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))