Average Error: 2.0 → 2.0
Time: 38.6s
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 + \left(t - 1\right) \cdot \log a\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)) (* (- 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)) + ((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)) + ((t - 1.0) * log(a))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b):
	return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
def code(x, y, z, t, a, b):
	return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b)
	return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y)
end
function code(x, y, z, t, a, b)
	return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y)
end
function tmp = code(x, y, z, t, a, b)
	tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
end
function tmp = code(x, y, z, t, a, b)
	tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\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 + \left(t - 1\right) \cdot \log a\right) - b}}{y}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original2.0
Target10.6
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} \]

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. Final simplification2.0

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

Alternatives

Alternative 1
Error6.9
Cost27016
\[\begin{array}{l} t_1 := \left(t - 1\right) \cdot \log a\\ \mathbf{if}\;t_1 \leq -4 \cdot 10^{+14}:\\ \;\;\;\;\frac{\frac{x}{\frac{y}{{a}^{t}}}}{a}\\ \mathbf{elif}\;t_1 \leq 20.5:\\ \;\;\;\;\frac{x}{\frac{e^{b} \cdot \left(y \cdot a\right)}{{a}^{t}}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{{z}^{y}}{y \cdot \left(a \cdot e^{b}\right)}\\ \end{array} \]
Alternative 2
Error7.3
Cost14024
\[\begin{array}{l} \mathbf{if}\;b \leq -2.7 \cdot 10^{-61}:\\ \;\;\;\;x \cdot \frac{\frac{{a}^{t}}{a}}{y}\\ \mathbf{elif}\;b \leq 7.8 \cdot 10^{-11}:\\ \;\;\;\;\frac{{a}^{\left(t - 1\right)} \cdot {z}^{y}}{y} \cdot \left(x - x \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \frac{e^{-b}}{a}}{y}\\ \end{array} \]
Alternative 3
Error8.2
Cost13768
\[\begin{array}{l} \mathbf{if}\;b \leq -2.7 \cdot 10^{-61}:\\ \;\;\;\;x \cdot \frac{\frac{{a}^{t}}{a}}{y}\\ \mathbf{elif}\;b \leq 7.8 \cdot 10^{-11}:\\ \;\;\;\;\frac{\frac{{z}^{y}}{\frac{a}{x \cdot {a}^{t}}}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \frac{e^{-b}}{a}}{y}\\ \end{array} \]
Alternative 4
Error19.2
Cost7244
\[\begin{array}{l} t_1 := -1 + \left(1 + \frac{\frac{x}{y}}{a}\right)\\ \mathbf{if}\;b \leq 6 \cdot 10^{-265}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 4 \cdot 10^{-147}:\\ \;\;\;\;x \cdot \frac{\frac{1}{a}}{y}\\ \mathbf{elif}\;b \leq 7 \cdot 10^{-9}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\ \end{array} \]
Alternative 5
Error19.2
Cost7244
\[\begin{array}{l} t_1 := -1 + \left(1 + \frac{\frac{x}{y}}{a}\right)\\ \mathbf{if}\;b \leq 6 \cdot 10^{-265}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 4 \cdot 10^{-147}:\\ \;\;\;\;x \cdot \frac{\frac{1}{a}}{y}\\ \mathbf{elif}\;b \leq 7.8 \cdot 10^{-11}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\ \end{array} \]
Alternative 6
Error14.5
Cost7044
\[\begin{array}{l} \mathbf{if}\;b \leq 7.8 \cdot 10^{-11}:\\ \;\;\;\;\frac{{a}^{t}}{y \cdot \frac{a}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\ \end{array} \]
Alternative 7
Error13.0
Cost7044
\[\begin{array}{l} \mathbf{if}\;b \leq 7.8 \cdot 10^{-11}:\\ \;\;\;\;\frac{{a}^{t}}{y} \cdot \frac{x}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\ \end{array} \]
Alternative 8
Error10.3
Cost7044
\[\begin{array}{l} \mathbf{if}\;b \leq 7.8 \cdot 10^{-11}:\\ \;\;\;\;\frac{\frac{x}{\frac{y}{{a}^{t}}}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\ \end{array} \]
Alternative 9
Error10.3
Cost7044
\[\begin{array}{l} \mathbf{if}\;b \leq 7.8 \cdot 10^{-11}:\\ \;\;\;\;x \cdot \frac{\frac{{a}^{t}}{a}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\ \end{array} \]
Alternative 10
Error10.3
Cost7044
\[\begin{array}{l} \mathbf{if}\;b \leq 7.8 \cdot 10^{-11}:\\ \;\;\;\;x \cdot \frac{\frac{{a}^{t}}{a}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \frac{e^{-b}}{a}}{y}\\ \end{array} \]
Alternative 11
Error29.9
Cost972
\[\begin{array}{l} t_1 := -1 + \left(1 + \frac{\frac{x}{y}}{a}\right)\\ \mathbf{if}\;x \leq -1.4827707961849869 \cdot 10^{+97}:\\ \;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\ \mathbf{elif}\;x \leq -5.713506376205113 \cdot 10^{-264}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 4.231918396660454 \cdot 10^{-284}:\\ \;\;\;\;\frac{\frac{1}{a}}{\frac{y}{x}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 12
Error30.7
Cost840
\[\begin{array}{l} t_1 := -1 + \left(1 + \frac{\frac{x}{y}}{a}\right)\\ \mathbf{if}\;y \leq -1.05 \cdot 10^{-194}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.7537615020359181 \cdot 10^{-28}:\\ \;\;\;\;\frac{\frac{x}{a}}{y}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 13
Error38.4
Cost712
\[\begin{array}{l} \mathbf{if}\;x \leq -10642385.07475035:\\ \;\;\;\;\frac{x}{y \cdot a}\\ \mathbf{elif}\;x \leq 7.068191017238826 \cdot 10^{-24}:\\ \;\;\;\;\frac{\frac{x}{y}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{a}{\frac{1}{y}}}\\ \end{array} \]
Alternative 14
Error38.0
Cost712
\[\begin{array}{l} \mathbf{if}\;x \leq -10642385.07475035:\\ \;\;\;\;\frac{x}{y \cdot a}\\ \mathbf{elif}\;x \leq 0.11912408756043989:\\ \;\;\;\;\frac{\frac{1}{a}}{\frac{y}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{a}{\frac{1}{y}}}\\ \end{array} \]
Alternative 15
Error38.2
Cost712
\[\begin{array}{l} \mathbf{if}\;x \leq -10642385.07475035:\\ \;\;\;\;\frac{x}{y \cdot a}\\ \mathbf{elif}\;x \leq 0.11912408756043989:\\ \;\;\;\;\frac{\frac{1}{a}}{\frac{y}{x}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{\frac{1}{a}}{y}\\ \end{array} \]
Alternative 16
Error40.8
Cost584
\[\begin{array}{l} t_1 := \frac{\frac{x}{y}}{a}\\ \mathbf{if}\;y \leq -1.06 \cdot 10^{-156}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 3.3437706649108843 \cdot 10^{-41}:\\ \;\;\;\;\frac{\frac{x}{a}}{y}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 17
Error38.5
Cost584
\[\begin{array}{l} t_1 := \frac{x}{y \cdot a}\\ \mathbf{if}\;x \leq -909507586446159.6:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 8.304635162732112 \cdot 10^{-81}:\\ \;\;\;\;\frac{\frac{x}{y}}{a}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 18
Error42.0
Cost320
\[\frac{\frac{x}{y}}{a} \]

Error

Reproduce

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