Average Error: 1.9 → 1.9
Time: 20.2s
Precision: 64
\[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
\[\frac{x \cdot e^{\left(y \cdot \log z + \left(\log \left(\sqrt{a}\right) \cdot \left(t - 1\right) + \log \left(\sqrt{a}\right) \cdot \left(t - 1\right)\right)\right) - b}}{y}\]
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\frac{x \cdot e^{\left(y \cdot \log z + \left(\log \left(\sqrt{a}\right) \cdot \left(t - 1\right) + \log \left(\sqrt{a}\right) \cdot \left(t - 1\right)\right)\right) - b}}{y}
double f(double x, double y, double z, double t, double a, double b) {
        double r497198 = x;
        double r497199 = y;
        double r497200 = z;
        double r497201 = log(r497200);
        double r497202 = r497199 * r497201;
        double r497203 = t;
        double r497204 = 1.0;
        double r497205 = r497203 - r497204;
        double r497206 = a;
        double r497207 = log(r497206);
        double r497208 = r497205 * r497207;
        double r497209 = r497202 + r497208;
        double r497210 = b;
        double r497211 = r497209 - r497210;
        double r497212 = exp(r497211);
        double r497213 = r497198 * r497212;
        double r497214 = r497213 / r497199;
        return r497214;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r497215 = x;
        double r497216 = y;
        double r497217 = z;
        double r497218 = log(r497217);
        double r497219 = r497216 * r497218;
        double r497220 = a;
        double r497221 = sqrt(r497220);
        double r497222 = log(r497221);
        double r497223 = t;
        double r497224 = 1.0;
        double r497225 = r497223 - r497224;
        double r497226 = r497222 * r497225;
        double r497227 = r497226 + r497226;
        double r497228 = r497219 + r497227;
        double r497229 = b;
        double r497230 = r497228 - r497229;
        double r497231 = exp(r497230);
        double r497232 = r497215 * r497231;
        double r497233 = r497232 / r497216;
        return r497233;
}

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
Target11.1
Herbie1.9
\[\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.9

    \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
  2. Using strategy rm
  3. Applied add-sqr-sqrt1.9

    \[\leadsto \frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log \color{blue}{\left(\sqrt{a} \cdot \sqrt{a}\right)}\right) - b}}{y}\]
  4. Applied log-prod1.9

    \[\leadsto \frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \color{blue}{\left(\log \left(\sqrt{a}\right) + \log \left(\sqrt{a}\right)\right)}\right) - b}}{y}\]
  5. Applied distribute-lft-in1.9

    \[\leadsto \frac{x \cdot e^{\left(y \cdot \log z + \color{blue}{\left(\left(t - 1\right) \cdot \log \left(\sqrt{a}\right) + \left(t - 1\right) \cdot \log \left(\sqrt{a}\right)\right)}\right) - b}}{y}\]
  6. Simplified1.9

    \[\leadsto \frac{x \cdot e^{\left(y \cdot \log z + \left(\color{blue}{\log \left(\sqrt{a}\right) \cdot \left(t - 1\right)} + \left(t - 1\right) \cdot \log \left(\sqrt{a}\right)\right)\right) - b}}{y}\]
  7. Simplified1.9

    \[\leadsto \frac{x \cdot e^{\left(y \cdot \log z + \left(\log \left(\sqrt{a}\right) \cdot \left(t - 1\right) + \color{blue}{\log \left(\sqrt{a}\right) \cdot \left(t - 1\right)}\right)\right) - b}}{y}\]
  8. Final simplification1.9

    \[\leadsto \frac{x \cdot e^{\left(y \cdot \log z + \left(\log \left(\sqrt{a}\right) \cdot \left(t - 1\right) + \log \left(\sqrt{a}\right) \cdot \left(t - 1\right)\right)\right) - b}}{y}\]

Reproduce

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