Average Error: 2.0 → 2.0
Time: 21.9s
Precision: binary64
Cost: 20160
\[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
\[\frac{x \cdot e^{\left(y \cdot \log z + \log a \cdot \left(t - 1\right)\right) - b}}{y}\]
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\frac{x \cdot e^{\left(y \cdot \log z + \log a \cdot \left(t - 1\right)\right) - b}}{y}
(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
 (/ (* x (exp (- (+ (* y (log z)) (* (log a) (- t 1.0))) 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) {
	return (x * exp(((y * log(z)) + (log(a) * (t - 1.0))) - b)) / y;
}

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.4
Herbie2.0
\[\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}\]

Alternatives

Alternative 1
Error2.7
Cost20802
\[\begin{array}{l} \mathbf{if}\;t - 1 \leq -1.747504108442715 \cdot 10^{+43}:\\ \;\;\;\;0\\ \mathbf{elif}\;t - 1 \leq -0.9999771961910843:\\ \;\;\;\;\frac{x \cdot e^{\left(y \cdot \log z - \log a\right) - b}}{y}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array}\]
Alternative 2
Error5.8
Cost8194
\[\begin{array}{l} \mathbf{if}\;y \leq -1.2023810919181153 \cdot 10^{-05}:\\ \;\;\;\;0\\ \mathbf{elif}\;y \leq 6.322490782731635 \cdot 10^{-10}:\\ \;\;\;\;\frac{\frac{x \cdot {a}^{t}}{a + a \cdot \left(b + 0.5 \cdot \left(b \cdot b\right)\right)}}{y}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array}\]
Alternative 3
Error8.9
Cost8452
\[\begin{array}{l} \mathbf{if}\;y \leq -1.5287769211473313 \cdot 10^{-50}:\\ \;\;\;\;0\\ \mathbf{elif}\;y \leq 7.336038229035721 \cdot 10^{-122}:\\ \;\;\;\;\frac{\frac{x \cdot {a}^{t}}{a + a \cdot b}}{y}\\ \mathbf{elif}\;y \leq 1.2756663518317316 \cdot 10^{-70}:\\ \;\;\;\;0\\ \mathbf{elif}\;y \leq 1.1080159718745315 \cdot 10^{-14}:\\ \;\;\;\;\frac{\frac{{a}^{t}}{a} \cdot \left(x - x \cdot b\right)}{y}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array}\]
Alternative 4
Error8.8
Cost8196
\[\begin{array}{l} \mathbf{if}\;y \leq -1.175991962308869 \cdot 10^{-53}:\\ \;\;\;\;0\\ \mathbf{elif}\;y \leq 1.224522396493428 \cdot 10^{-121}:\\ \;\;\;\;\frac{\frac{x \cdot {a}^{t}}{a + a \cdot b}}{y}\\ \mathbf{elif}\;y \leq 4.2867832321504243 \cdot 10^{-72}:\\ \;\;\;\;0\\ \mathbf{elif}\;y \leq 6.775060926426175 \cdot 10^{-13}:\\ \;\;\;\;\frac{\frac{x \cdot {a}^{t}}{a}}{y}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array}\]
Alternative 5
Error9.8
Cost8838
\[\begin{array}{l} \mathbf{if}\;y \leq -2.97990036672408 \cdot 10^{-51}:\\ \;\;\;\;0\\ \mathbf{elif}\;y \leq -5.186114575046571 \cdot 10^{-270}:\\ \;\;\;\;\frac{\frac{x \cdot {a}^{t}}{a}}{y}\\ \mathbf{elif}\;y \leq 1.7008658712550107 \cdot 10^{-255}:\\ \;\;\;\;0\\ \mathbf{elif}\;y \leq 1.9924474478193607 \cdot 10^{-171}:\\ \;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\ \mathbf{elif}\;y \leq 1.875061867711607 \cdot 10^{-74}:\\ \;\;\;\;0\\ \mathbf{elif}\;y \leq 9.84156621656129 \cdot 10^{-16}:\\ \;\;\;\;\frac{\frac{x \cdot {a}^{t}}{a}}{y}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array}\]
Alternative 6
Error9.0
Cost8453
\[\begin{array}{l} \mathbf{if}\;t \leq -4.126640680011579 \cdot 10^{-09}:\\ \;\;\;\;0\\ \mathbf{elif}\;t \leq -3.230229487041782 \cdot 10^{-173}:\\ \;\;\;\;\frac{x}{y \cdot \left(a \cdot e^{b}\right)}\\ \mathbf{elif}\;t \leq -1.1846935343094022 \cdot 10^{-259}:\\ \;\;\;\;0\\ \mathbf{elif}\;t \leq 3.496264817706804 \cdot 10^{-253}:\\ \;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\ \mathbf{elif}\;t \leq 4.4900408873054747 \cdot 10^{-156}:\\ \;\;\;\;\frac{x}{y \cdot \left(a \cdot e^{b}\right)}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array}\]
Alternative 7
Error9.9
Cost7629
\[\begin{array}{l} \mathbf{if}\;y \leq -5.3251708816334154 \cdot 10^{-89}:\\ \;\;\;\;0\\ \mathbf{elif}\;y \leq -7.837953882995127 \cdot 10^{-212} \lor \neg \left(y \leq 2.1222088019567648 \cdot 10^{-252}\right) \land y \leq 1.2446680750477978 \cdot 10^{-173}:\\ \;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array}\]
Alternative 8
Error10.0
Cost64
\[0\]
Alternative 9
Error62.0
Cost64
\[1\]

Error

Derivation

  1. Initial program 2.0

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

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

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

Reproduce

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