?

Average Error: 1.9 → 1.9
Time: 37.1s
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

Original1.9
Target11.4
Herbie1.9
\[\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 1.9

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

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

Alternatives

Alternative 1
Error2.1
Cost26692
\[\begin{array}{l} \mathbf{if}\;\left(t + -1\right) \cdot \log a \leq -640:\\ \;\;\;\;\frac{x}{{a}^{\left(1 - t\right)} \cdot \left(y + y \cdot b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot e^{\left(y \cdot \log z - \log a\right) - b}}{y}\\ \end{array} \]
Alternative 2
Error9.9
Cost14164
\[\begin{array}{l} t_1 := \frac{\frac{\frac{{z}^{y}}{a}}{e^{b}}}{\frac{y}{x}}\\ \mathbf{if}\;b \leq -3.5 \cdot 10^{-39}:\\ \;\;\;\;\frac{x}{{a}^{\left(1 - t\right)} \cdot \left(y + y \cdot b\right)}\\ \mathbf{elif}\;b \leq -9 \cdot 10^{-147}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -1.05 \cdot 10^{-220}:\\ \;\;\;\;\frac{\left(x \cdot {a}^{\left(t + -1\right)}\right) \cdot \left(1 - b\right)}{y}\\ \mathbf{elif}\;b \leq -3.5 \cdot 10^{-257}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 0.7:\\ \;\;\;\;\frac{{z}^{y}}{y} \cdot \left({a}^{t} \cdot \frac{x}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\ \end{array} \]
Alternative 3
Error10.1
Cost14164
\[\begin{array}{l} t_1 := \frac{\frac{\frac{{z}^{y}}{a}}{e^{b}}}{\frac{y}{x}}\\ \mathbf{if}\;b \leq -4.6 \cdot 10^{-39}:\\ \;\;\;\;\frac{x}{{a}^{\left(1 - t\right)} \cdot \left(y + y \cdot b\right)}\\ \mathbf{elif}\;b \leq -2.9 \cdot 10^{-157}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -1.55 \cdot 10^{-220}:\\ \;\;\;\;\frac{\left(x \cdot {a}^{\left(t + -1\right)}\right) \cdot \left(1 - b\right)}{y}\\ \mathbf{elif}\;b \leq -1.8 \cdot 10^{-256}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 5 \cdot 10^{-29}:\\ \;\;\;\;\frac{{z}^{y}}{y} \cdot \left({a}^{t} \cdot \frac{x}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot e^{\left(t + -1\right) \cdot \log a - b}}{y}\\ \end{array} \]
Alternative 4
Error10.9
Cost13968
\[\begin{array}{l} t_1 := \frac{\frac{\frac{{z}^{y}}{a}}{e^{b}}}{\frac{y}{x}}\\ t_2 := \frac{x}{{a}^{\left(1 - t\right)} \cdot \left(y + y \cdot b\right)}\\ \mathbf{if}\;b \leq -4.3 \cdot 10^{-39}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -1.75 \cdot 10^{-147}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -1.05 \cdot 10^{-220}:\\ \;\;\;\;\frac{\left(x \cdot {a}^{\left(t + -1\right)}\right) \cdot \left(1 - b\right)}{y}\\ \mathbf{elif}\;b \leq 6.5 \cdot 10^{-231}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 0.82:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\ \end{array} \]
Alternative 5
Error9.9
Cost13836
\[\begin{array}{l} t_1 := a \cdot e^{b}\\ \mathbf{if}\;b \leq -3.4 \cdot 10^{-46}:\\ \;\;\;\;\frac{x}{{a}^{\left(1 - t\right)} \cdot \left(y + y \cdot b\right)}\\ \mathbf{elif}\;b \leq 1.9 \cdot 10^{-74}:\\ \;\;\;\;\frac{\left(x \cdot {a}^{\left(t + -1\right)}\right) \cdot \left(1 - b\right)}{y}\\ \mathbf{elif}\;b \leq 1:\\ \;\;\;\;\frac{x \cdot {z}^{y}}{y \cdot t_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t_1}}{y}\\ \end{array} \]
Alternative 6
Error10.1
Cost7564
\[\begin{array}{l} t_1 := \frac{x}{{a}^{\left(1 - t\right)} \cdot \left(y + y \cdot b\right)}\\ \mathbf{if}\;b \leq -1.45 \cdot 10^{-220}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 3.6 \cdot 10^{-231}:\\ \;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\ \mathbf{elif}\;b \leq 0.8:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\ \end{array} \]
Alternative 7
Error21.3
Cost7508
\[\begin{array}{l} t_1 := \frac{x}{a} \cdot \left(-\frac{b}{y}\right)\\ \mathbf{if}\;b \leq -1.4 \cdot 10^{-203}:\\ \;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\ \mathbf{elif}\;b \leq -6.5 \cdot 10^{-272}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 2.3 \cdot 10^{-287}:\\ \;\;\;\;\frac{\frac{a - a \cdot b}{a \cdot a}}{\frac{y}{x}}\\ \mathbf{elif}\;b \leq 1.8 \cdot 10^{-266}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 0.92:\\ \;\;\;\;\frac{x - x \cdot b}{y \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\ \end{array} \]
Alternative 8
Error11.0
Cost7440
\[\begin{array}{l} t_1 := x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\ t_2 := x \cdot \frac{{a}^{\left(t + -1\right)}}{y}\\ \mathbf{if}\;b \leq -5.2 \cdot 10^{-221}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 6.6 \cdot 10^{-231}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 7.2 \cdot 10^{-74}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 330:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\ \end{array} \]
Alternative 9
Error10.0
Cost7432
\[\begin{array}{l} \mathbf{if}\;b \leq -6 \cdot 10^{-46}:\\ \;\;\;\;\frac{x}{{a}^{\left(1 - t\right)} \cdot \left(y + y \cdot b\right)}\\ \mathbf{elif}\;b \leq 3.5 \cdot 10^{-73}:\\ \;\;\;\;\frac{\left(x \cdot {a}^{\left(t + -1\right)}\right) \cdot \left(1 - b\right)}{y}\\ \mathbf{elif}\;b \leq 55:\\ \;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\ \end{array} \]
Alternative 10
Error24.2
Cost7376
\[\begin{array}{l} t_1 := \frac{x}{a} \cdot \left(-\frac{b}{y}\right)\\ \mathbf{if}\;b \leq -4.5 \cdot 10^{-205}:\\ \;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\ \mathbf{elif}\;b \leq -3.5 \cdot 10^{-272}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 4 \cdot 10^{-287}:\\ \;\;\;\;\frac{\frac{a - a \cdot b}{a \cdot a}}{\frac{y}{x}}\\ \mathbf{elif}\;b \leq 1.85 \cdot 10^{-266}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{e^{b}}}{y \cdot a}\\ \end{array} \]
Alternative 11
Error10.7
Cost7308
\[\begin{array}{l} t_1 := \frac{x}{\frac{y}{\frac{{a}^{t}}{a}}}\\ \mathbf{if}\;b \leq -7.6 \cdot 10^{-221}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 1.15 \cdot 10^{-231}:\\ \;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\ \mathbf{elif}\;b \leq 0.41:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\ \end{array} \]
Alternative 12
Error13.3
Cost7044
\[\begin{array}{l} \mathbf{if}\;b \leq 185:\\ \;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\ \end{array} \]
Alternative 13
Error41.9
Cost1368
\[\begin{array}{l} t_1 := \frac{x}{a} \cdot \left(-\frac{b}{y}\right)\\ \mathbf{if}\;b \leq -5.5 \cdot 10^{-206}:\\ \;\;\;\;\frac{\frac{1}{a}}{\frac{y}{x}}\\ \mathbf{elif}\;b \leq -4 \cdot 10^{-270}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -3.5 \cdot 10^{-303}:\\ \;\;\;\;\frac{\frac{x}{y}}{a}\\ \mathbf{elif}\;b \leq 5.2 \cdot 10^{-269}:\\ \;\;\;\;\frac{-\frac{b}{a}}{\frac{y}{x}}\\ \mathbf{elif}\;b \leq 1.6 \cdot 10^{-266}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 0.84:\\ \;\;\;\;\left(1 - b\right) \cdot \frac{x}{y \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{y}{\frac{x}{a}}}\\ \end{array} \]
Alternative 14
Error42.0
Cost1240
\[\begin{array}{l} t_1 := \frac{x}{a} \cdot \left(-\frac{b}{y}\right)\\ \mathbf{if}\;b \leq -4.9 \cdot 10^{-206}:\\ \;\;\;\;\frac{\frac{1}{a}}{\frac{y}{x}}\\ \mathbf{elif}\;b \leq -9.4 \cdot 10^{-271}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -3 \cdot 10^{-303}:\\ \;\;\;\;\frac{\frac{x}{y}}{a}\\ \mathbf{elif}\;b \leq 2.2 \cdot 10^{-269}:\\ \;\;\;\;\frac{-\frac{b}{a}}{\frac{y}{x}}\\ \mathbf{elif}\;b \leq 1.7 \cdot 10^{-266}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 1.05 \cdot 10^{+37}:\\ \;\;\;\;\frac{x}{y \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{y}{\frac{x}{a}}}\\ \end{array} \]
Alternative 15
Error34.8
Cost1228
\[\begin{array}{l} t_1 := \frac{x}{a} \cdot \left(-\frac{b}{y}\right)\\ t_2 := \frac{x}{a \cdot \left(y + y \cdot b\right)}\\ \mathbf{if}\;b \leq -6.2 \cdot 10^{-203}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -2.05 \cdot 10^{-271}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 6.5 \cdot 10^{-287}:\\ \;\;\;\;\frac{\frac{a - a \cdot b}{a \cdot a}}{\frac{y}{x}}\\ \mathbf{elif}\;b \leq 1.25 \cdot 10^{-266}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 16
Error40.3
Cost908
\[\begin{array}{l} \mathbf{if}\;y \leq -4.5 \cdot 10^{-52}:\\ \;\;\;\;\frac{\frac{1}{a}}{\frac{y}{x}}\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{-32}:\\ \;\;\;\;\frac{\frac{x}{a}}{y}\\ \mathbf{elif}\;y \leq 2.15 \cdot 10^{+236}:\\ \;\;\;\;\frac{x}{a} \cdot \left(-\frac{b}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot a}\\ \end{array} \]
Alternative 17
Error34.6
Cost841
\[\begin{array}{l} \mathbf{if}\;b \leq -3.2 \cdot 10^{-205} \lor \neg \left(b \leq 1.3 \cdot 10^{-266}\right):\\ \;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a} \cdot \left(-\frac{b}{y}\right)\\ \end{array} \]
Alternative 18
Error40.5
Cost585
\[\begin{array}{l} \mathbf{if}\;x \leq -1.65 \cdot 10^{-119} \lor \neg \left(x \leq 2 \cdot 10^{-80}\right):\\ \;\;\;\;\frac{x}{y \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{a}}{y}\\ \end{array} \]
Alternative 19
Error39.0
Cost580
\[\begin{array}{l} \mathbf{if}\;a \leq 2.8 \cdot 10^{-74}:\\ \;\;\;\;\frac{1}{a} \cdot \frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot a}\\ \end{array} \]
Alternative 20
Error38.8
Cost580
\[\begin{array}{l} \mathbf{if}\;a \leq 2.8 \cdot 10^{-74}:\\ \;\;\;\;\frac{\frac{1}{a}}{\frac{y}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot a}\\ \end{array} \]
Alternative 21
Error39.0
Cost452
\[\begin{array}{l} \mathbf{if}\;a \leq 2.8 \cdot 10^{-74}:\\ \;\;\;\;\frac{\frac{x}{y}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot a}\\ \end{array} \]
Alternative 22
Error42.0
Cost320
\[\frac{x}{y \cdot a} \]

Error

Reproduce?

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