Average Error: 2.2 → 1.2
Time: 31.8s
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 -2.2792272315365673 \cdot 10^{-161}:\\ \;\;\;\;\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt[3]{\frac{y}{e^{y \cdot \log z + \left(\left(t + -1\right) \cdot \log a - b\right)}}} \cdot \sqrt[3]{\frac{y}{e^{y \cdot \log z + \left(\left(t + -1\right) \cdot \log a - b\right)}}}} \cdot \frac{\sqrt[3]{x}}{\sqrt[3]{\frac{y}{e^{y \cdot \log z + \left(\left(t + -1\right) \cdot \log a - b\right)}}}}\\ \mathbf{elif}\;x \leq 9.227147354557408 \cdot 10^{-83}:\\ \;\;\;\;e^{y \cdot \log z + \left(\left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{y}{e^{y \cdot \log z + \left(\left(t + -1\right) \cdot \log a - b\right)}}}\\ \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 -2.2792272315365673 \cdot 10^{-161}:\\
\;\;\;\;\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt[3]{\frac{y}{e^{y \cdot \log z + \left(\left(t + -1\right) \cdot \log a - b\right)}}} \cdot \sqrt[3]{\frac{y}{e^{y \cdot \log z + \left(\left(t + -1\right) \cdot \log a - b\right)}}}} \cdot \frac{\sqrt[3]{x}}{\sqrt[3]{\frac{y}{e^{y \cdot \log z + \left(\left(t + -1\right) \cdot \log a - b\right)}}}}\\

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

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

\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 (<= x -2.2792272315365673e-161)
   (*
    (/
     (* (cbrt x) (cbrt x))
     (*
      (cbrt (/ y (exp (+ (* y (log z)) (- (* (+ t -1.0) (log a)) b)))))
      (cbrt (/ y (exp (+ (* y (log z)) (- (* (+ t -1.0) (log a)) b)))))))
    (/
     (cbrt x)
     (cbrt (/ y (exp (+ (* y (log z)) (- (* (+ t -1.0) (log a)) b)))))))
   (if (<= x 9.227147354557408e-83)
     (* (exp (+ (* y (log z)) (- (* (+ t -1.0) (log a)) b))) (/ x y))
     (/ x (/ y (exp (+ (* y (log z)) (- (* (+ t -1.0) (log a)) b))))))))
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 (x <= -2.2792272315365673e-161) {
		tmp = ((cbrt(x) * cbrt(x)) / (cbrt(y / exp((y * log(z)) + (((t + -1.0) * log(a)) - b))) * cbrt(y / exp((y * log(z)) + (((t + -1.0) * log(a)) - b))))) * (cbrt(x) / cbrt(y / exp((y * log(z)) + (((t + -1.0) * log(a)) - b))));
	} else if (x <= 9.227147354557408e-83) {
		tmp = exp((y * log(z)) + (((t + -1.0) * log(a)) - b)) * (x / y);
	} else {
		tmp = x / (y / exp((y * log(z)) + (((t + -1.0) * log(a)) - b)));
	}
	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

Original2.2
Target10.8
Herbie1.2
\[\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 x < -2.27922723153656731e-161

    1. Initial program 1.3

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
    2. Simplified1.4

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

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

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

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

    if -2.27922723153656731e-161 < x < 9.2271473545574076e-83

    1. Initial program 4.3

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

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

    if 9.2271473545574076e-83 < x

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

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

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

Reproduce

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