Average Error: 2.0 → 2.9
Time: 8.7s
Precision: binary64
\[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
\[\begin{array}{l} \mathbf{if}\;x \leq 1.6373611271993253 \cdot 10^{-203} \lor \neg \left(x \leq 3.7081369141019746 \cdot 10^{-81}\right):\\ \;\;\;\;\frac{1}{\frac{y}{x \cdot {e}^{\left(y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)\right)}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y} \cdot {z}^{y}}{{a}^{1} \cdot e^{b - t \cdot \log a}}\\ \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}\;x \leq 1.6373611271993253 \cdot 10^{-203} \lor \neg \left(x \leq 3.7081369141019746 \cdot 10^{-81}\right):\\
\;\;\;\;\frac{1}{\frac{y}{x \cdot {e}^{\left(y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)\right)}}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y} \cdot {z}^{y}}{{a}^{1} \cdot e^{b - t \cdot \log a}}\\

\end{array}
double code(double x, double y, double z, double t, double a, double b) {
	return (((double) (x * ((double) exp(((double) (((double) (((double) (y * ((double) log(z)))) + ((double) (((double) (t - 1.0)) * ((double) log(a)))))) - b)))))) / y);
}
double code(double x, double y, double z, double t, double a, double b) {
	double VAR;
	if (((x <= 1.6373611271993253e-203) || !(x <= 3.7081369141019746e-81))) {
		VAR = (1.0 / (y / ((double) (x * ((double) pow(((double) M_E), ((double) (((double) (y * ((double) log(z)))) + ((double) (((double) (((double) (t - 1.0)) * ((double) log(a)))) - b))))))))));
	} else {
		VAR = (((double) ((x / y) * ((double) pow(z, y)))) / ((double) (((double) pow(a, 1.0)) * ((double) exp(((double) (b - ((double) (t * ((double) log(a)))))))))));
	}
	return VAR;
}

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
Herbie2.9
\[\begin{array}{l} \mathbf{if}\;t < -0.8845848504127471:\\ \;\;\;\;\frac{x \cdot \frac{{a}^{\left(t - 1\right)}}{y}}{\left(b + 1\right) - y \cdot \log z}\\ \mathbf{elif}\;t < 852031.2288374073:\\ \;\;\;\;\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 x < 1.63736112719932534e-203 or 3.70813691410197456e-81 < x

    1. Initial program Error: 1.8 bits

      \[\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 *-un-lft-identityError: 1.8 bits

      \[\leadsto \frac{x \cdot e^{\color{blue}{1 \cdot \left(\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b\right)}}}{y}\]
    4. Applied exp-prodError: 1.9 bits

      \[\leadsto \frac{x \cdot \color{blue}{{\left(e^{1}\right)}^{\left(\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b\right)}}}{y}\]
    5. SimplifiedError: 1.9 bits

      \[\leadsto \frac{x \cdot {\color{blue}{e}}^{\left(\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b\right)}}{y}\]
    6. Using strategy rm
    7. Applied clear-numError: 1.9 bits

      \[\leadsto \color{blue}{\frac{1}{\frac{y}{x \cdot {e}^{\left(\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b\right)}}}}\]
    8. SimplifiedError: 1.9 bits

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

    if 1.63736112719932534e-203 < x < 3.70813691410197456e-81

    1. Initial program Error: 4.1 bits

      \[\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 *-un-lft-identityError: 4.1 bits

      \[\leadsto \frac{x \cdot e^{\color{blue}{1 \cdot \left(\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b\right)}}}{y}\]
    4. Applied exp-prodError: 4.1 bits

      \[\leadsto \frac{x \cdot \color{blue}{{\left(e^{1}\right)}^{\left(\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b\right)}}}{y}\]
    5. SimplifiedError: 4.1 bits

      \[\leadsto \frac{x \cdot {\color{blue}{e}}^{\left(\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b\right)}}{y}\]
    6. Using strategy rm
    7. Applied clear-numError: 4.1 bits

      \[\leadsto \color{blue}{\frac{1}{\frac{y}{x \cdot {e}^{\left(\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b\right)}}}}\]
    8. SimplifiedError: 4.1 bits

      \[\leadsto \frac{1}{\color{blue}{\frac{y}{x \cdot {e}^{\left(y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)\right)}}}}\]
    9. Taylor expanded around inf Error: 4.1 bits

      \[\leadsto \frac{1}{\color{blue}{\frac{y}{e^{\left(\log 1 \cdot t + \left(\log 1 \cdot y + 1 \cdot \log \left(\frac{1}{a}\right)\right)\right) - \left(1 \cdot \log 1 + \left(b + \left(\log \left(\frac{1}{z}\right) \cdot y + \log \left(\frac{1}{a}\right) \cdot t\right)\right)\right)} \cdot x}}}\]
    10. SimplifiedError: 14.5 bits

      \[\leadsto \frac{1}{\color{blue}{\frac{y}{x \cdot \left({a}^{\left(-1\right)} \cdot \left(e^{-\left(b - t \cdot \log a\right)} \cdot {z}^{y}\right)\right)}}}\]
    11. Using strategy rm
    12. Applied exp-negError: 14.5 bits

      \[\leadsto \frac{1}{\frac{y}{x \cdot \left({a}^{\left(-1\right)} \cdot \left(\color{blue}{\frac{1}{e^{b - t \cdot \log a}}} \cdot {z}^{y}\right)\right)}}\]
    13. Applied associate-*l/Error: 14.5 bits

      \[\leadsto \frac{1}{\frac{y}{x \cdot \left({a}^{\left(-1\right)} \cdot \color{blue}{\frac{1 \cdot {z}^{y}}{e^{b - t \cdot \log a}}}\right)}}\]
    14. Applied pow-negError: 14.5 bits

      \[\leadsto \frac{1}{\frac{y}{x \cdot \left(\color{blue}{\frac{1}{{a}^{1}}} \cdot \frac{1 \cdot {z}^{y}}{e^{b - t \cdot \log a}}\right)}}\]
    15. Applied frac-timesError: 14.5 bits

      \[\leadsto \frac{1}{\frac{y}{x \cdot \color{blue}{\frac{1 \cdot \left(1 \cdot {z}^{y}\right)}{{a}^{1} \cdot e^{b - t \cdot \log a}}}}}\]
    16. Applied associate-*r/Error: 14.5 bits

      \[\leadsto \frac{1}{\frac{y}{\color{blue}{\frac{x \cdot \left(1 \cdot \left(1 \cdot {z}^{y}\right)\right)}{{a}^{1} \cdot e^{b - t \cdot \log a}}}}}\]
    17. Applied associate-/r/Error: 11.4 bits

      \[\leadsto \frac{1}{\color{blue}{\frac{y}{x \cdot \left(1 \cdot \left(1 \cdot {z}^{y}\right)\right)} \cdot \left({a}^{1} \cdot e^{b - t \cdot \log a}\right)}}\]
    18. Applied associate-/r*Error: 11.4 bits

      \[\leadsto \color{blue}{\frac{\frac{1}{\frac{y}{x \cdot \left(1 \cdot \left(1 \cdot {z}^{y}\right)\right)}}}{{a}^{1} \cdot e^{b - t \cdot \log a}}}\]
    19. SimplifiedError: 11.4 bits

      \[\leadsto \frac{\color{blue}{\frac{x}{y} \cdot {z}^{y}}}{{a}^{1} \cdot e^{b - t \cdot \log a}}\]
  3. Recombined 2 regimes into one program.
  4. Final simplificationError: 2.9 bits

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.6373611271993253 \cdot 10^{-203} \lor \neg \left(x \leq 3.7081369141019746 \cdot 10^{-81}\right):\\ \;\;\;\;\frac{1}{\frac{y}{x \cdot {e}^{\left(y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)\right)}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y} \cdot {z}^{y}}{{a}^{1} \cdot e^{b - t \cdot \log a}}\\ \end{array}\]

Reproduce

herbie shell --seed 2020200 
(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.0)) y)) (- (+ b 1.0) (* y (log z)))) (if (< t 852031.2288374073) (/ (* (/ x y) (pow a (- t 1.0))) (exp (- b (* (log z) y)))) (/ (* x (/ (pow a (- t 1.0)) y)) (- (+ b 1.0) (* y (log z))))))

  (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))