Average Error: 1.7 → 1.1
Time: 19.1s
Precision: 64
\[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
\[\left(\frac{\sqrt{{\left(\frac{1}{a}\right)}^{1}}}{\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}} \cdot x\right) \cdot \frac{\frac{\sqrt{{\left(\frac{1}{a}\right)}^{1}}}{\sqrt{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}\]
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\left(\frac{\sqrt{{\left(\frac{1}{a}\right)}^{1}}}{\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}} \cdot x\right) \cdot \frac{\frac{\sqrt{{\left(\frac{1}{a}\right)}^{1}}}{\sqrt{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}
double f(double x, double y, double z, double t, double a, double b) {
        double r476373 = x;
        double r476374 = y;
        double r476375 = z;
        double r476376 = log(r476375);
        double r476377 = r476374 * r476376;
        double r476378 = t;
        double r476379 = 1.0;
        double r476380 = r476378 - r476379;
        double r476381 = a;
        double r476382 = log(r476381);
        double r476383 = r476380 * r476382;
        double r476384 = r476377 + r476383;
        double r476385 = b;
        double r476386 = r476384 - r476385;
        double r476387 = exp(r476386);
        double r476388 = r476373 * r476387;
        double r476389 = r476388 / r476374;
        return r476389;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r476390 = 1.0;
        double r476391 = a;
        double r476392 = r476390 / r476391;
        double r476393 = 1.0;
        double r476394 = pow(r476392, r476393);
        double r476395 = sqrt(r476394);
        double r476396 = y;
        double r476397 = z;
        double r476398 = r476390 / r476397;
        double r476399 = log(r476398);
        double r476400 = log(r476392);
        double r476401 = t;
        double r476402 = b;
        double r476403 = fma(r476400, r476401, r476402);
        double r476404 = fma(r476396, r476399, r476403);
        double r476405 = exp(r476404);
        double r476406 = sqrt(r476405);
        double r476407 = r476395 / r476406;
        double r476408 = x;
        double r476409 = r476407 * r476408;
        double r476410 = r476407 / r476396;
        double r476411 = r476409 * r476410;
        return r476411;
}

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

Target

Original1.7
Target11.1
Herbie1.1
\[\begin{array}{l} \mathbf{if}\;t \lt -0.88458485041274715:\\ \;\;\;\;\frac{x \cdot \frac{{a}^{\left(t - 1\right)}}{y}}{\left(b + 1\right) - y \cdot \log z}\\ \mathbf{elif}\;t \lt 852031.22883740731:\\ \;\;\;\;\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.7

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

    \[\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 *-un-lft-identity1.1

    \[\leadsto \frac{x \cdot \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)}}}{\color{blue}{1 \cdot y}}\]
  6. Applied times-frac1.6

    \[\leadsto \color{blue}{\frac{x}{1} \cdot \frac{\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}}\]
  7. Simplified1.6

    \[\leadsto \color{blue}{x} \cdot \frac{\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}\]
  8. Using strategy rm
  9. Applied *-un-lft-identity1.6

    \[\leadsto x \cdot \frac{\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)}}}{\color{blue}{1 \cdot y}}\]
  10. Applied add-sqr-sqrt1.6

    \[\leadsto x \cdot \frac{\frac{{\left(\frac{1}{a}\right)}^{1}}{\color{blue}{\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}} \cdot \sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}}}}{1 \cdot y}\]
  11. Applied add-sqr-sqrt1.6

    \[\leadsto x \cdot \frac{\frac{\color{blue}{\sqrt{{\left(\frac{1}{a}\right)}^{1}} \cdot \sqrt{{\left(\frac{1}{a}\right)}^{1}}}}{\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}} \cdot \sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}}}{1 \cdot y}\]
  12. Applied times-frac1.6

    \[\leadsto x \cdot \frac{\color{blue}{\frac{\sqrt{{\left(\frac{1}{a}\right)}^{1}}}{\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}} \cdot \frac{\sqrt{{\left(\frac{1}{a}\right)}^{1}}}{\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}}}}{1 \cdot y}\]
  13. Applied times-frac1.6

    \[\leadsto x \cdot \color{blue}{\left(\frac{\frac{\sqrt{{\left(\frac{1}{a}\right)}^{1}}}{\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}}}{1} \cdot \frac{\frac{\sqrt{{\left(\frac{1}{a}\right)}^{1}}}{\sqrt{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}\right)}\]
  14. Applied associate-*r*1.1

    \[\leadsto \color{blue}{\left(x \cdot \frac{\frac{\sqrt{{\left(\frac{1}{a}\right)}^{1}}}{\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}}}{1}\right) \cdot \frac{\frac{\sqrt{{\left(\frac{1}{a}\right)}^{1}}}{\sqrt{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}}\]
  15. Simplified1.1

    \[\leadsto \color{blue}{\left(\frac{\sqrt{{\left(\frac{1}{a}\right)}^{1}}}{\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}} \cdot x\right)} \cdot \frac{\frac{\sqrt{{\left(\frac{1}{a}\right)}^{1}}}{\sqrt{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}\]
  16. Final simplification1.1

    \[\leadsto \left(\frac{\sqrt{{\left(\frac{1}{a}\right)}^{1}}}{\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}} \cdot x\right) \cdot \frac{\frac{\sqrt{{\left(\frac{1}{a}\right)}^{1}}}{\sqrt{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}\]

Reproduce

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