Average Error: 1.9 → 1.0
Time: 25.6s
Precision: 64
\[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
\[{\left(\sqrt{\frac{1}{a}}\right)}^{1} \cdot \frac{x}{\frac{y}{\frac{{\left(\sqrt{\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{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
{\left(\sqrt{\frac{1}{a}}\right)}^{1} \cdot \frac{x}{\frac{y}{\frac{{\left(\sqrt{\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)}}}}
double f(double x, double y, double z, double t, double a, double b) {
        double r460575 = x;
        double r460576 = y;
        double r460577 = z;
        double r460578 = log(r460577);
        double r460579 = r460576 * r460578;
        double r460580 = t;
        double r460581 = 1.0;
        double r460582 = r460580 - r460581;
        double r460583 = a;
        double r460584 = log(r460583);
        double r460585 = r460582 * r460584;
        double r460586 = r460579 + r460585;
        double r460587 = b;
        double r460588 = r460586 - r460587;
        double r460589 = exp(r460588);
        double r460590 = r460575 * r460589;
        double r460591 = r460590 / r460576;
        return r460591;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r460592 = 1.0;
        double r460593 = a;
        double r460594 = r460592 / r460593;
        double r460595 = sqrt(r460594);
        double r460596 = 1.0;
        double r460597 = pow(r460595, r460596);
        double r460598 = x;
        double r460599 = y;
        double r460600 = z;
        double r460601 = r460592 / r460600;
        double r460602 = log(r460601);
        double r460603 = log(r460594);
        double r460604 = t;
        double r460605 = b;
        double r460606 = fma(r460603, r460604, r460605);
        double r460607 = fma(r460599, r460602, r460606);
        double r460608 = exp(r460607);
        double r460609 = r460597 / r460608;
        double r460610 = r460599 / r460609;
        double r460611 = r460598 / r460610;
        double r460612 = r460597 * r460611;
        return r460612;
}

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.9
Target11.0
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 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.2

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

    \[\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. Using strategy rm
  7. Applied *-un-lft-identity1.2

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

    \[\leadsto \frac{x}{\frac{y}{\frac{{\color{blue}{\left(\sqrt{\frac{1}{a}} \cdot \sqrt{\frac{1}{a}}\right)}}^{1}}{1 \cdot e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}}}\]
  9. Applied unpow-prod-down1.3

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

    \[\leadsto \frac{x}{\frac{y}{\color{blue}{\frac{{\left(\sqrt{\frac{1}{a}}\right)}^{1}}{1} \cdot \frac{{\left(\sqrt{\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)}}}}}\]
  11. Applied *-un-lft-identity1.3

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

    \[\leadsto \frac{x}{\color{blue}{\frac{1}{\frac{{\left(\sqrt{\frac{1}{a}}\right)}^{1}}{1}} \cdot \frac{y}{\frac{{\left(\sqrt{\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)}}}}}\]
  13. Applied *-un-lft-identity1.3

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

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

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

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

Reproduce

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