Average Error: 2.0 → 1.0
Time: 26.6s
Precision: 64
\[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
\[\frac{\frac{{\left({a}^{\left(-\frac{1}{2}\right)}\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} \cdot \left(\frac{{\left(\frac{1}{\sqrt{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)\]
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\frac{\frac{{\left({a}^{\left(-\frac{1}{2}\right)}\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} \cdot \left(\frac{{\left(\frac{1}{\sqrt{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)
double f(double x, double y, double z, double t, double a, double b) {
        double r485262 = x;
        double r485263 = y;
        double r485264 = z;
        double r485265 = log(r485264);
        double r485266 = r485263 * r485265;
        double r485267 = t;
        double r485268 = 1.0;
        double r485269 = r485267 - r485268;
        double r485270 = a;
        double r485271 = log(r485270);
        double r485272 = r485269 * r485271;
        double r485273 = r485266 + r485272;
        double r485274 = b;
        double r485275 = r485273 - r485274;
        double r485276 = exp(r485275);
        double r485277 = r485262 * r485276;
        double r485278 = r485277 / r485263;
        return r485278;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r485279 = a;
        double r485280 = 0.5;
        double r485281 = -r485280;
        double r485282 = pow(r485279, r485281);
        double r485283 = 1.0;
        double r485284 = pow(r485282, r485283);
        double r485285 = y;
        double r485286 = 1.0;
        double r485287 = z;
        double r485288 = r485286 / r485287;
        double r485289 = log(r485288);
        double r485290 = r485286 / r485279;
        double r485291 = log(r485290);
        double r485292 = t;
        double r485293 = b;
        double r485294 = fma(r485291, r485292, r485293);
        double r485295 = fma(r485285, r485289, r485294);
        double r485296 = exp(r485295);
        double r485297 = sqrt(r485296);
        double r485298 = r485284 / r485297;
        double r485299 = r485298 / r485285;
        double r485300 = sqrt(r485279);
        double r485301 = r485286 / r485300;
        double r485302 = pow(r485301, r485283);
        double r485303 = r485302 / r485297;
        double r485304 = x;
        double r485305 = r485303 * r485304;
        double r485306 = r485299 * r485305;
        return r485306;
}

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

Original2.0
Target11.5
Herbie1.0
\[\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 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 \color{blue}{\frac{x \cdot 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. Simplified6.2

    \[\leadsto \color{blue}{\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)}}}{\frac{y}{x}}}\]
  4. Using strategy rm
  5. Applied div-inv6.2

    \[\leadsto \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}{y \cdot \frac{1}{x}}}\]
  6. Applied add-sqr-sqrt6.2

    \[\leadsto \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)}}}}}{y \cdot \frac{1}{x}}\]
  7. Applied add-sqr-sqrt6.2

    \[\leadsto \frac{\frac{{\left(\frac{1}{\color{blue}{\sqrt{a} \cdot \sqrt{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)}}}}{y \cdot \frac{1}{x}}\]
  8. Applied *-un-lft-identity6.2

    \[\leadsto \frac{\frac{{\left(\frac{\color{blue}{1 \cdot 1}}{\sqrt{a} \cdot \sqrt{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)}}}}{y \cdot \frac{1}{x}}\]
  9. Applied times-frac6.2

    \[\leadsto \frac{\frac{{\color{blue}{\left(\frac{1}{\sqrt{a}} \cdot \frac{1}{\sqrt{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)}}}}{y \cdot \frac{1}{x}}\]
  10. Applied unpow-prod-down6.2

    \[\leadsto \frac{\frac{\color{blue}{{\left(\frac{1}{\sqrt{a}}\right)}^{1} \cdot {\left(\frac{1}{\sqrt{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)}}}}{y \cdot \frac{1}{x}}\]
  11. Applied times-frac6.2

    \[\leadsto \frac{\color{blue}{\frac{{\left(\frac{1}{\sqrt{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{{\left(\frac{1}{\sqrt{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 \cdot \frac{1}{x}}\]
  12. Applied times-frac1.0

    \[\leadsto \color{blue}{\frac{\frac{{\left(\frac{1}{\sqrt{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} \cdot \frac{\frac{{\left(\frac{1}{\sqrt{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)}}}}{\frac{1}{x}}}\]
  13. Simplified1.0

    \[\leadsto \frac{\frac{{\left(\frac{1}{\sqrt{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} \cdot \color{blue}{\left(\frac{{\left(\frac{1}{\sqrt{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)}\]
  14. Using strategy rm
  15. Applied pow1/21.0

    \[\leadsto \frac{\frac{{\left(\frac{1}{\color{blue}{{a}^{\frac{1}{2}}}}\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} \cdot \left(\frac{{\left(\frac{1}{\sqrt{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)\]
  16. Applied pow-flip1.0

    \[\leadsto \frac{\frac{{\color{blue}{\left({a}^{\left(-\frac{1}{2}\right)}\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} \cdot \left(\frac{{\left(\frac{1}{\sqrt{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)\]
  17. Final simplification1.0

    \[\leadsto \frac{\frac{{\left({a}^{\left(-\frac{1}{2}\right)}\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} \cdot \left(\frac{{\left(\frac{1}{\sqrt{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)\]

Reproduce

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