Average Error: 2.0 → 23.0
Time: 34.8s
Precision: 64
\[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
\[\frac{{\left(\frac{1}{{a}^{1}}\right)}^{1}}{\frac{e^{b}}{{z}^{y}}} \cdot \frac{\frac{x}{y}}{{\left(\frac{1}{a}\right)}^{t}}\]
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\frac{{\left(\frac{1}{{a}^{1}}\right)}^{1}}{\frac{e^{b}}{{z}^{y}}} \cdot \frac{\frac{x}{y}}{{\left(\frac{1}{a}\right)}^{t}}
double f(double x, double y, double z, double t, double a, double b) {
        double r347959 = x;
        double r347960 = y;
        double r347961 = z;
        double r347962 = log(r347961);
        double r347963 = r347960 * r347962;
        double r347964 = t;
        double r347965 = 1.0;
        double r347966 = r347964 - r347965;
        double r347967 = a;
        double r347968 = log(r347967);
        double r347969 = r347966 * r347968;
        double r347970 = r347963 + r347969;
        double r347971 = b;
        double r347972 = r347970 - r347971;
        double r347973 = exp(r347972);
        double r347974 = r347959 * r347973;
        double r347975 = r347974 / r347960;
        return r347975;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r347976 = 1.0;
        double r347977 = a;
        double r347978 = 1.0;
        double r347979 = pow(r347977, r347978);
        double r347980 = r347976 / r347979;
        double r347981 = pow(r347980, r347978);
        double r347982 = b;
        double r347983 = exp(r347982);
        double r347984 = z;
        double r347985 = y;
        double r347986 = pow(r347984, r347985);
        double r347987 = r347983 / r347986;
        double r347988 = r347981 / r347987;
        double r347989 = x;
        double r347990 = r347989 / r347985;
        double r347991 = r347976 / r347977;
        double r347992 = t;
        double r347993 = pow(r347991, r347992);
        double r347994 = r347990 / r347993;
        double r347995 = r347988 * r347994;
        return r347995;
}

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

Original2.0
Target11.1
Herbie23.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. Using strategy rm
  3. Applied add-cube-cbrt2.0

    \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}} \cdot \sqrt[3]{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}\right) \cdot \sqrt[3]{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}}}{y}\]
  4. 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}}\]
  5. Simplified6.6

    \[\leadsto \color{blue}{\frac{\frac{{\left(\frac{1}{a}\right)}^{1}}{e^{y \cdot \log \left(\frac{1}{z}\right) + \left(\log \left(\frac{1}{a}\right) \cdot t + b\right)}}}{\frac{y}{x}}}\]
  6. Taylor expanded around inf 1.5

    \[\leadsto \color{blue}{{\left(\frac{1}{{a}^{1}}\right)}^{1} \cdot \frac{x}{e^{\log \left(\frac{1}{z}\right) \cdot y + \left(\log \left(\frac{1}{a}\right) \cdot t + b\right)} \cdot y}}\]
  7. Final simplification23.0

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

Reproduce

herbie shell --seed 2019308 
(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.88458485041274715) (/ (* x (/ (pow a (- t 1)) y)) (- (+ b 1) (* y (log z)))) (if (< t 852031.22883740731) (/ (* (/ 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))