Average Error: 1.9 → 2.3
Time: 17.5s
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}\;\left(t - 1\right) \cdot \log a \leq -556.4469315286576:\\ \;\;\;\;\frac{x \cdot {e}^{\left(\left(\left(t - 1\right) \cdot \log a + y \cdot \log z\right) - b\right)}}{y}\\ \mathbf{elif}\;\left(t - 1\right) \cdot \log a \leq -168.97615256968146:\\ \;\;\;\;\frac{x \cdot e^{y \cdot \log z}}{a \cdot \left(y \cdot e^{b}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \left(\sqrt[3]{e^{\left(\left(t - 1\right) \cdot \log a + y \cdot \log z\right) - b}} \cdot \left(\sqrt[3]{e^{\left(\left(t - 1\right) \cdot \log a + y \cdot \log z\right) - b}} \cdot \sqrt[3]{e^{\left(\left(t - 1\right) \cdot \log a + y \cdot \log z\right) - b}}\right)\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}\;\left(t - 1\right) \cdot \log a \leq -556.4469315286576:\\
\;\;\;\;\frac{x \cdot {e}^{\left(\left(\left(t - 1\right) \cdot \log a + y \cdot \log z\right) - b\right)}}{y}\\

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

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

\end{array}
(FPCore (x y z t a b)
 :precision binary64
 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
(FPCore (x y z t a b)
 :precision binary64
 (if (<= (* (- t 1.0) (log a)) -556.4469315286576)
   (/ (* x (pow E (- (+ (* (- t 1.0) (log a)) (* y (log z))) b))) y)
   (if (<= (* (- t 1.0) (log a)) -168.97615256968146)
     (/ (* x (exp (* y (log z)))) (* a (* y (exp b))))
     (/
      (*
       x
       (*
        (cbrt (exp (- (+ (* (- t 1.0) (log a)) (* y (log z))) b)))
        (*
         (cbrt (exp (- (+ (* (- t 1.0) (log a)) (* y (log z))) b)))
         (cbrt (exp (- (+ (* (- t 1.0) (log a)) (* y (log z))) b))))))
      y))))
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 tmp;
	if (((t - 1.0) * log(a)) <= -556.4469315286576) {
		tmp = (x * pow(((double) M_E), ((((t - 1.0) * log(a)) + (y * log(z))) - b))) / y;
	} else if (((t - 1.0) * log(a)) <= -168.97615256968146) {
		tmp = (x * exp(y * log(z))) / (a * (y * exp(b)));
	} else {
		tmp = (x * (cbrt(exp((((t - 1.0) * log(a)) + (y * log(z))) - b)) * (cbrt(exp((((t - 1.0) * log(a)) + (y * log(z))) - b)) * cbrt(exp((((t - 1.0) * log(a)) + (y * log(z))) - b))))) / y;
	}
	return tmp;
}

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.2
Herbie2.3
\[\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 3 regimes
  2. if (*.f64 (-.f64 t 1) (log.f64 a)) < -556.44693152865761

    1. Initial program 1.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 *-un-lft-identity_binary64_126951.0

      \[\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-prod_binary64_127471.0

      \[\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. Simplified1.0

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

    if -556.44693152865761 < (*.f64 (-.f64 t 1) (log.f64 a)) < -168.97615256968146

    1. Initial program 6.3

      \[\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-sqr-sqrt_binary64_127176.3

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

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

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

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

    if -168.97615256968146 < (*.f64 (-.f64 t 1) (log.f64 a))

    1. Initial program 1.2

      \[\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-cbrt_binary64_127301.2

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(t - 1\right) \cdot \log a \leq -556.4469315286576:\\ \;\;\;\;\frac{x \cdot {e}^{\left(\left(\left(t - 1\right) \cdot \log a + y \cdot \log z\right) - b\right)}}{y}\\ \mathbf{elif}\;\left(t - 1\right) \cdot \log a \leq -168.97615256968146:\\ \;\;\;\;\frac{x \cdot e^{y \cdot \log z}}{a \cdot \left(y \cdot e^{b}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \left(\sqrt[3]{e^{\left(\left(t - 1\right) \cdot \log a + y \cdot \log z\right) - b}} \cdot \left(\sqrt[3]{e^{\left(\left(t - 1\right) \cdot \log a + y \cdot \log z\right) - b}} \cdot \sqrt[3]{e^{\left(\left(t - 1\right) \cdot \log a + y \cdot \log z\right) - b}}\right)\right)}{y}\\ \end{array}\]

Reproduce

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