Average Error: 1.9 → 0.1
Time: 15.0s
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}\;a \le 1.0133091657172024 \cdot 10^{-12}:\\ \;\;\;\;\frac{1}{\frac{y}{x \cdot \frac{{\left(\frac{1}{a}\right)}^{1}}{e^{b + \left(\log \left(\frac{1}{z}\right) \cdot y + \log \left(\frac{1}{a}\right) \cdot t\right)}}}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{\frac{{\left(\frac{1}{a}\right)}^{1}}{e^{b + \left(\log \left(\frac{1}{z}\right) \cdot y + \log \left(\frac{1}{a}\right) \cdot t\right)}}}{y}\\ \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 1.0133091657172024 \cdot 10^{-12}:\\
\;\;\;\;\frac{1}{\frac{y}{x \cdot \frac{{\left(\frac{1}{a}\right)}^{1}}{e^{b + \left(\log \left(\frac{1}{z}\right) \cdot y + \log \left(\frac{1}{a}\right) \cdot t\right)}}}}\\

\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\frac{{\left(\frac{1}{a}\right)}^{1}}{e^{b + \left(\log \left(\frac{1}{z}\right) \cdot y + \log \left(\frac{1}{a}\right) \cdot t\right)}}}{y}\\

\end{array}
double code(double x, double y, double z, double t, double a, double b) {
	return ((double) (((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 ((a <= 1.0133091657172024e-12)) {
		VAR = ((double) (1.0 / ((double) (y / ((double) (x * ((double) (((double) pow(((double) (1.0 / a)), 1.0)) / ((double) exp(((double) (b + ((double) (((double) (((double) log(((double) (1.0 / z)))) * y)) + ((double) (((double) log(((double) (1.0 / a)))) * t))))))))))))))));
	} else {
		VAR = ((double) (x * ((double) (((double) (((double) pow(((double) (1.0 / a)), 1.0)) / ((double) exp(((double) (b + ((double) (((double) (((double) log(((double) (1.0 / z)))) * y)) + ((double) (((double) log(((double) (1.0 / a)))) * t)))))))))) / y))));
	}
	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

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 < 1.0133091657172024e-12

    1. Initial program 0.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 0.8

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

      \[\leadsto \frac{x \cdot \color{blue}{\frac{{\left(\frac{1}{a}\right)}^{1}}{e^{b + \left(\log \left(\frac{1}{z}\right) \cdot y + \log \left(\frac{1}{a}\right) \cdot t\right)}}}}{y}\]
    4. Using strategy rm
    5. Applied clear-num0.1

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

    if 1.0133091657172024e-12 < 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 \frac{x \cdot \color{blue}{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)}}}{y}\]
    3. Simplified2.1

      \[\leadsto \frac{x \cdot \color{blue}{\frac{{\left(\frac{1}{a}\right)}^{1}}{e^{b + \left(\log \left(\frac{1}{z}\right) \cdot y + \log \left(\frac{1}{a}\right) \cdot t\right)}}}}{y}\]
    4. Using strategy rm
    5. Applied *-un-lft-identity2.1

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

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

      \[\leadsto \color{blue}{x} \cdot \frac{\frac{{\left(\frac{1}{a}\right)}^{1}}{e^{b + \left(\log \left(\frac{1}{z}\right) \cdot y + \log \left(\frac{1}{a}\right) \cdot t\right)}}}{y}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.1

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \le 1.0133091657172024 \cdot 10^{-12}:\\ \;\;\;\;\frac{1}{\frac{y}{x \cdot \frac{{\left(\frac{1}{a}\right)}^{1}}{e^{b + \left(\log \left(\frac{1}{z}\right) \cdot y + \log \left(\frac{1}{a}\right) \cdot t\right)}}}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{\frac{{\left(\frac{1}{a}\right)}^{1}}{e^{b + \left(\log \left(\frac{1}{z}\right) \cdot y + \log \left(\frac{1}{a}\right) \cdot t\right)}}}{y}\\ \end{array}\]

Reproduce

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