Average Error: 1.9 → 0.1
Time: 19.4s
Precision: 64
\[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
\[\begin{array}{l} \mathbf{if}\;a \le 4.126712793956439 \cdot 10^{-20}:\\ \;\;\;\;\frac{x \cdot \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)}}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\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)}}}{y}}{\frac{1}{x}}\\ \end{array}\]
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\begin{array}{l}
\mathbf{if}\;a \le 4.126712793956439 \cdot 10^{-20}:\\
\;\;\;\;\frac{x \cdot \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)}}}{y}\\

\mathbf{else}:\\
\;\;\;\;\frac{\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)}}}{y}}{\frac{1}{x}}\\

\end{array}
double f(double x, double y, double z, double t, double a, double b) {
        double r474353 = x;
        double r474354 = y;
        double r474355 = z;
        double r474356 = log(r474355);
        double r474357 = r474354 * r474356;
        double r474358 = t;
        double r474359 = 1.0;
        double r474360 = r474358 - r474359;
        double r474361 = a;
        double r474362 = log(r474361);
        double r474363 = r474360 * r474362;
        double r474364 = r474357 + r474363;
        double r474365 = b;
        double r474366 = r474364 - r474365;
        double r474367 = exp(r474366);
        double r474368 = r474353 * r474367;
        double r474369 = r474368 / r474354;
        return r474369;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r474370 = a;
        double r474371 = 4.126712793956439e-20;
        bool r474372 = r474370 <= r474371;
        double r474373 = x;
        double r474374 = 1.0;
        double r474375 = r474374 / r474370;
        double r474376 = 1.0;
        double r474377 = pow(r474375, r474376);
        double r474378 = y;
        double r474379 = z;
        double r474380 = r474374 / r474379;
        double r474381 = log(r474380);
        double r474382 = r474378 * r474381;
        double r474383 = log(r474375);
        double r474384 = t;
        double r474385 = r474383 * r474384;
        double r474386 = b;
        double r474387 = r474385 + r474386;
        double r474388 = r474382 + r474387;
        double r474389 = exp(r474388);
        double r474390 = r474377 / r474389;
        double r474391 = r474373 * r474390;
        double r474392 = r474391 / r474378;
        double r474393 = r474390 / r474378;
        double r474394 = r474374 / r474373;
        double r474395 = r474393 / r474394;
        double r474396 = r474372 ? r474392 : r474395;
        return r474396;
}

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.0
Herbie0.1
\[\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. Split input into 2 regimes
  2. if a < 4.126712793956439e-20

    1. Initial program 0.7

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
    2. Taylor expanded around inf 0.7

      \[\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. Simplified0.1

      \[\leadsto \frac{x \cdot \color{blue}{\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)}}}}{y}\]

    if 4.126712793956439e-20 < a

    1. Initial program 2.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 2.9

      \[\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. Simplified7.1

      \[\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}}}\]
    4. Using strategy rm
    5. Applied div-inv7.1

      \[\leadsto \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)}}}{\color{blue}{y \cdot \frac{1}{x}}}\]
    6. Applied associate-/r*0.1

      \[\leadsto \color{blue}{\frac{\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)}}}{y}}{\frac{1}{x}}}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.1

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \le 4.126712793956439 \cdot 10^{-20}:\\ \;\;\;\;\frac{x \cdot \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)}}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\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)}}}{y}}{\frac{1}{x}}\\ \end{array}\]

Reproduce

herbie shell --seed 2020039 
(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))