Average Error: 2.0 → 2.4
Time: 10.3s
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}\;\left(t - 1\right) \cdot \log a \le -546.37453138819501 \lor \neg \left(\left(t - 1\right) \cdot \log a \le 86.757485924579555\right):\\ \;\;\;\;\left(x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}\right) \cdot \frac{1}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{\frac{y}{{a}^{\left(t - 1\right)}}}{{z}^{y}} \cdot e^{b}}\\ \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}\;\left(t - 1\right) \cdot \log a \le -546.37453138819501 \lor \neg \left(\left(t - 1\right) \cdot \log a \le 86.757485924579555\right):\\
\;\;\;\;\left(x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}\right) \cdot \frac{1}{y}\\

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

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

Derivation

  1. Split input into 2 regimes
  2. if (* (- t 1.0) (log a)) < -546.374531388195 or 86.75748592457956 < (* (- t 1.0) (log a))

    1. Initial program 1.1

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

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

    if -546.374531388195 < (* (- t 1.0) (log a)) < 86.75748592457956

    1. Initial program 4.8

      \[\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 +-commutative4.8

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

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

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

      \[\leadsto \frac{x \cdot \left(\color{blue}{{a}^{\left(t - 1\right)}} \cdot e^{y \cdot \log z - b}\right)}{y}\]
    7. Using strategy rm
    8. Applied associate-/l*0.4

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

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

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

Reproduce

herbie shell --seed 2020071 
(FPCore (x y z t a b)
  :name "Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2"
  :precision binary64
  (/ (* x (exp (- (+ (* y (log z)) (* (- t 1) (log a))) b))) y))