Average Error: 2.0 → 2.0
Time: 30.3s
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
Target11.0
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
Error7.9
Cost47380
\[\begin{array}{l} t_1 := \left(t + -1\right) \cdot \log a\\ t_2 := \frac{\frac{x}{a \cdot e^{b}}}{y}\\ \mathbf{if}\;t_1 \leq -5 \cdot 10^{+14}:\\ \;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\ \mathbf{elif}\;t_1 \leq -520:\\ \;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\ \mathbf{elif}\;t_1 \leq -470:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq -55.5:\\ \;\;\;\;x \cdot \frac{{z}^{y}}{a \cdot \left(y \cdot e^{b}\right)}\\ \mathbf{elif}\;t_1 \leq 195:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{{z}^{y}}{a}}{e^{b}}}{\frac{y}{x}}\\ \end{array} \]
Alternative 2
Error2.6
Cost26692
\[\begin{array}{l} \mathbf{if}\;\left(t + -1\right) \cdot \log a \leq -650:\\ \;\;\;\;\frac{\frac{x}{\frac{y}{{a}^{t}}}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot e^{\left(y \cdot \log z - \log a\right) - b}}{y}\\ \end{array} \]
Alternative 3
Error11.9
Cost14100
\[\begin{array}{l} t_1 := \frac{\frac{x}{\frac{y}{{a}^{t}}}}{a}\\ t_2 := x \cdot \frac{{z}^{y}}{a \cdot \left(y \cdot e^{b}\right)}\\ \mathbf{if}\;b \leq -1.65 \cdot 10^{-56}:\\ \;\;\;\;\frac{\frac{{z}^{y}}{a}}{\frac{y}{x}}\\ \mathbf{elif}\;b \leq -1.28 \cdot 10^{-141}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -2.05 \cdot 10^{-212}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 1.4 \cdot 10^{-244}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 1.25 \cdot 10^{-182}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 8 \cdot 10^{-13}:\\ \;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\ \end{array} \]
Alternative 4
Error11.7
Cost13968
\[\begin{array}{l} t_1 := \frac{\frac{{z}^{y}}{a}}{\frac{y}{x}}\\ \mathbf{if}\;b \leq -5.5 \cdot 10^{-66}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 2.4 \cdot 10^{-252}:\\ \;\;\;\;x \cdot \frac{\frac{{a}^{\left(t + -1\right)}}{e^{b}}}{y}\\ \mathbf{elif}\;b \leq 3.6 \cdot 10^{-182}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 8 \cdot 10^{-13}:\\ \;\;\;\;\frac{x \cdot \frac{\frac{{a}^{t}}{a}}{e^{b}}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\ \end{array} \]
Alternative 5
Error11.7
Cost13704
\[\begin{array}{l} t_1 := {a}^{\left(t + -1\right)}\\ t_2 := \frac{\frac{{z}^{y}}{a}}{\frac{y}{x}}\\ \mathbf{if}\;b \leq -2.35 \cdot 10^{-66}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 2.5 \cdot 10^{-250}:\\ \;\;\;\;x \cdot \frac{\frac{t_1}{e^{b}}}{y}\\ \mathbf{elif}\;b \leq 4.3 \cdot 10^{-182}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 8 \cdot 10^{-13}:\\ \;\;\;\;\frac{x \cdot t_1}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\ \end{array} \]
Alternative 6
Error13.1
Cost7704
\[\begin{array}{l} t_1 := \frac{{a}^{t}}{y} \cdot \frac{x}{a}\\ t_2 := x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\ \mathbf{if}\;b \leq -2.9 \cdot 10^{-67}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -5.2 \cdot 10^{-141}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -1.4 \cdot 10^{-210}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 2.5 \cdot 10^{-244}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 1.35 \cdot 10^{-166}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 8 \cdot 10^{-13}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\ \end{array} \]
Alternative 7
Error12.1
Cost7704
\[\begin{array}{l} t_1 := \frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\ t_2 := x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\ \mathbf{if}\;b \leq -4 \cdot 10^{-68}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -5.5 \cdot 10^{-142}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -1.1 \cdot 10^{-216}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 1.85 \cdot 10^{-244}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 4.6 \cdot 10^{-181}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 7.5 \cdot 10^{-13}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\ \end{array} \]
Alternative 8
Error11.9
Cost7704
\[\begin{array}{l} t_1 := \frac{\frac{x}{\frac{y}{{a}^{t}}}}{a}\\ t_2 := x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\ \mathbf{if}\;b \leq -2.3 \cdot 10^{-55}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -2.25 \cdot 10^{-141}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -3.5 \cdot 10^{-212}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 6.5 \cdot 10^{-245}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 4.8 \cdot 10^{-183}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 8 \cdot 10^{-13}:\\ \;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\ \end{array} \]
Alternative 9
Error11.9
Cost7704
\[\begin{array}{l} t_1 := \frac{\frac{x}{\frac{y}{{a}^{t}}}}{a}\\ t_2 := \frac{{z}^{y}}{a}\\ t_3 := x \cdot \frac{t_2}{y}\\ \mathbf{if}\;b \leq -8 \cdot 10^{-53}:\\ \;\;\;\;\frac{t_2}{\frac{y}{x}}\\ \mathbf{elif}\;b \leq -5.5 \cdot 10^{-141}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -3.5 \cdot 10^{-212}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq 2.6 \cdot 10^{-244}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 1.26 \cdot 10^{-180}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq 8 \cdot 10^{-13}:\\ \;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\ \end{array} \]
Alternative 10
Error18.8
Cost7244
\[\begin{array}{l} t_1 := -1 + \left(1 + \frac{x}{y \cdot a}\right)\\ \mathbf{if}\;b \leq -1.65 \cdot 10^{-214}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 2.2 \cdot 10^{-268}:\\ \;\;\;\;\frac{\frac{-x}{\frac{a}{b}}}{y}\\ \mathbf{elif}\;b \leq 3.2 \cdot 10^{-43}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\ \end{array} \]
Alternative 11
Error19.1
Cost7244
\[\begin{array}{l} t_1 := -1 + \left(1 + \frac{x}{y \cdot a}\right)\\ \mathbf{if}\;b \leq -2.9 \cdot 10^{-220}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 2 \cdot 10^{-265}:\\ \;\;\;\;\frac{\frac{-x}{\frac{a}{b}}}{y}\\ \mathbf{elif}\;b \leq 3.9 \cdot 10^{-125}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\ \end{array} \]
Alternative 12
Error15.3
Cost7044
\[\begin{array}{l} \mathbf{if}\;b \leq 1.5 \cdot 10^{-140}:\\ \;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{x}{e^{b}}}{y}}{a}\\ \end{array} \]
Alternative 13
Error20.0
Cost6980
\[\begin{array}{l} \mathbf{if}\;b \leq -1.5 \cdot 10^{-222}:\\ \;\;\;\;-1 + \left(1 + \frac{x}{y \cdot a}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{x}{e^{b}}}{y}}{a}\\ \end{array} \]
Alternative 14
Error30.5
Cost840
\[\begin{array}{l} t_1 := -1 + \left(1 + \frac{x}{y \cdot a}\right)\\ \mathbf{if}\;y \leq -3.2 \cdot 10^{-11}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.5 \cdot 10^{-61}:\\ \;\;\;\;\frac{1}{y \cdot \frac{a}{x}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 15
Error39.0
Cost716
\[\begin{array}{l} t_1 := \frac{x}{y \cdot a}\\ \mathbf{if}\;x \leq -3 \cdot 10^{+16}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 2 \cdot 10^{-233}:\\ \;\;\;\;\frac{\frac{x}{y}}{a}\\ \mathbf{elif}\;x \leq 2 \cdot 10^{-53}:\\ \;\;\;\;\frac{\frac{x}{a}}{y}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 16
Error38.9
Cost580
\[\begin{array}{l} \mathbf{if}\;a \leq 2.7 \cdot 10^{+80}:\\ \;\;\;\;\frac{1}{\frac{a}{\frac{x}{y}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot a}\\ \end{array} \]
Alternative 17
Error38.6
Cost580
\[\begin{array}{l} \mathbf{if}\;a \leq 8 \cdot 10^{+55}:\\ \;\;\;\;\frac{1}{\frac{a}{\frac{x}{y}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{y \cdot a}{x}}\\ \end{array} \]
Alternative 18
Error38.2
Cost580
\[\begin{array}{l} \mathbf{if}\;a \leq 3.8 \cdot 10^{-52}:\\ \;\;\;\;\frac{\frac{1}{a}}{\frac{y}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{y \cdot a}{x}}\\ \end{array} \]
Alternative 19
Error41.0
Cost452
\[\begin{array}{l} \mathbf{if}\;a \leq 9.5 \cdot 10^{+111}:\\ \;\;\;\;\frac{\frac{x}{a}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot a}\\ \end{array} \]
Alternative 20
Error41.7
Cost320
\[\frac{x}{y \cdot a} \]

Error

Reproduce

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