Average Error: 1.8 → 0.8
Time: 32.8s
Precision: 64
\[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
\[\sqrt{{\left(\frac{1}{a}\right)}^{1}} \cdot \frac{x}{\frac{y}{\frac{\sqrt{{\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{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\sqrt{{\left(\frac{1}{a}\right)}^{1}} \cdot \frac{x}{\frac{y}{\frac{\sqrt{{\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)}}}}
double f(double x, double y, double z, double t, double a, double b) {
        double r450266 = x;
        double r450267 = y;
        double r450268 = z;
        double r450269 = log(r450268);
        double r450270 = r450267 * r450269;
        double r450271 = t;
        double r450272 = 1.0;
        double r450273 = r450271 - r450272;
        double r450274 = a;
        double r450275 = log(r450274);
        double r450276 = r450273 * r450275;
        double r450277 = r450270 + r450276;
        double r450278 = b;
        double r450279 = r450277 - r450278;
        double r450280 = exp(r450279);
        double r450281 = r450266 * r450280;
        double r450282 = r450281 / r450267;
        return r450282;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r450283 = 1.0;
        double r450284 = a;
        double r450285 = r450283 / r450284;
        double r450286 = 1.0;
        double r450287 = pow(r450285, r450286);
        double r450288 = sqrt(r450287);
        double r450289 = x;
        double r450290 = y;
        double r450291 = z;
        double r450292 = r450283 / r450291;
        double r450293 = log(r450292);
        double r450294 = log(r450285);
        double r450295 = t;
        double r450296 = b;
        double r450297 = fma(r450294, r450295, r450296);
        double r450298 = fma(r450290, r450293, r450297);
        double r450299 = exp(r450298);
        double r450300 = r450288 / r450299;
        double r450301 = r450290 / r450300;
        double r450302 = r450289 / r450301;
        double r450303 = r450288 * r450302;
        return r450303;
}

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.8
Target11.4
Herbie0.8
\[\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.8

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

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

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

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

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

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

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

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

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

Reproduce

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