Average Error: 1.9 → 1.9
Time: 27.5s
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.3
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
Error7.6
Cost33805
\[\begin{array}{l} t_1 := \left(t - 1\right) \cdot \log a\\ \mathbf{if}\;t_1 \leq -600:\\ \;\;\;\;x \cdot \frac{\frac{{a}^{t}}{a}}{y}\\ \mathbf{elif}\;t_1 \leq 400 \lor \neg \left(t_1 \leq 635\right):\\ \;\;\;\;{z}^{y} \cdot \frac{x}{y \cdot \left(a \cdot e^{b}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{\frac{a}{{z}^{y}}}\\ \end{array} \]
Alternative 2
Error2.5
Cost26692
\[\begin{array}{l} \mathbf{if}\;\left(t - 1\right) \cdot \log a \leq -560:\\ \;\;\;\;x \cdot \frac{\frac{{a}^{t}}{a}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot e^{\left(y \cdot \log z - \log a\right) - b}}{y}\\ \end{array} \]
Alternative 3
Error11.0
Cost7308
\[\begin{array}{l} \mathbf{if}\;b \leq -2.45 \cdot 10^{-23}:\\ \;\;\;\;x \cdot \frac{\frac{{a}^{t}}{a}}{y}\\ \mathbf{elif}\;b \leq 2.9 \cdot 10^{-301}:\\ \;\;\;\;\frac{x}{y} \cdot \frac{{z}^{y}}{a}\\ \mathbf{elif}\;b \leq 3.8:\\ \;\;\;\;x \cdot \frac{{a}^{\left(t - 1\right)}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\ \end{array} \]
Alternative 4
Error11.0
Cost7308
\[\begin{array}{l} \mathbf{if}\;b \leq -1.82 \cdot 10^{-19}:\\ \;\;\;\;x \cdot \frac{\frac{{a}^{t}}{a}}{y}\\ \mathbf{elif}\;b \leq 3.3 \cdot 10^{-298}:\\ \;\;\;\;\frac{\frac{x}{y}}{\frac{a}{{z}^{y}}}\\ \mathbf{elif}\;b \leq 310:\\ \;\;\;\;x \cdot \frac{{a}^{\left(t - 1\right)}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\ \end{array} \]
Alternative 5
Error11.0
Cost7308
\[\begin{array}{l} \mathbf{if}\;b \leq -1.15 \cdot 10^{-13}:\\ \;\;\;\;\frac{x \cdot {a}^{t}}{y \cdot \left(a + a \cdot b\right)}\\ \mathbf{elif}\;b \leq 8.8 \cdot 10^{-297}:\\ \;\;\;\;\frac{\frac{x}{y}}{\frac{a}{{z}^{y}}}\\ \mathbf{elif}\;b \leq 82:\\ \;\;\;\;x \cdot \frac{{a}^{\left(t - 1\right)}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\ \end{array} \]
Alternative 6
Error21.3
Cost7112
\[\begin{array}{l} \mathbf{if}\;b \leq -1.5 \cdot 10^{-36}:\\ \;\;\;\;\frac{x}{a \cdot \left(y \cdot \left(1 + b\right)\right)}\\ \mathbf{elif}\;b \leq 2.75 \cdot 10^{-9}:\\ \;\;\;\;\frac{\frac{-x}{y}}{a \cdot \left(-1 - b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\ \end{array} \]
Alternative 7
Error21.3
Cost7112
\[\begin{array}{l} \mathbf{if}\;b \leq -2.4 \cdot 10^{-36}:\\ \;\;\;\;\frac{x}{a \cdot \left(y \cdot \left(1 + b\right)\right)}\\ \mathbf{elif}\;b \leq 3.05 \cdot 10^{-5}:\\ \;\;\;\;\frac{\frac{-x}{y}}{a \cdot \left(-1 - b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\ \end{array} \]
Alternative 8
Error9.9
Cost7044
\[\begin{array}{l} \mathbf{if}\;b \leq 170:\\ \;\;\;\;x \cdot \frac{\frac{{a}^{t}}{a}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\ \end{array} \]
Alternative 9
Error32.8
Cost2248
\[\begin{array}{l} t_1 := a \cdot \left(y \cdot b\right)\\ \mathbf{if}\;a \leq 3.2 \cdot 10^{-38}:\\ \;\;\;\;\frac{\frac{-x}{y}}{a \cdot \left(-1 - b\right)}\\ \mathbf{elif}\;a \leq 3200000000000:\\ \;\;\;\;\frac{x}{\frac{t_1 \cdot t_1 - \left(y \cdot a\right) \cdot \left(y \cdot a\right)}{t_1 - y \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \left(a + a \cdot b\right)}\\ \end{array} \]
Alternative 10
Error32.1
Cost905
\[\begin{array}{l} \mathbf{if}\;x \leq -2.4 \cdot 10^{-32} \lor \neg \left(x \leq 2.8 \cdot 10^{-99}\right):\\ \;\;\;\;\frac{x}{a \cdot \left(y \cdot \left(1 + b\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{-x}{y}}{a \cdot \left(-1 - b\right)}\\ \end{array} \]
Alternative 11
Error34.4
Cost841
\[\begin{array}{l} \mathbf{if}\;x \leq -1.4 \cdot 10^{-33} \lor \neg \left(x \leq 7.6 \cdot 10^{-110}\right):\\ \;\;\;\;\frac{x}{a \cdot \left(y \cdot \left(1 + b\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{a}\\ \end{array} \]
Alternative 12
Error31.6
Cost841
\[\begin{array}{l} \mathbf{if}\;y \leq -9 \cdot 10^{+111} \lor \neg \left(y \leq 1.06 \cdot 10^{-158}\right):\\ \;\;\;\;\frac{x}{a \cdot \left(y \cdot \left(1 + b\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{a + a \cdot b}}{y}\\ \end{array} \]
Alternative 13
Error34.9
Cost713
\[\begin{array}{l} \mathbf{if}\;b \leq -2.1 \cdot 10^{+16} \lor \neg \left(b \leq 0.00068\right):\\ \;\;\;\;\frac{x}{a \cdot \left(y \cdot b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{a}\\ \end{array} \]
Alternative 14
Error34.5
Cost712
\[\begin{array}{l} \mathbf{if}\;b \leq -4200:\\ \;\;\;\;\frac{x}{a \cdot \left(y \cdot b\right)}\\ \mathbf{elif}\;b \leq 2.8 \cdot 10^{-5}:\\ \;\;\;\;\frac{\frac{x}{y}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \left(a \cdot b\right)}\\ \end{array} \]
Alternative 15
Error32.8
Cost708
\[\begin{array}{l} \mathbf{if}\;a \leq 2.9 \cdot 10^{-49}:\\ \;\;\;\;\frac{\frac{x}{y}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \left(a + a \cdot b\right)}\\ \end{array} \]
Alternative 16
Error40.8
Cost452
\[\begin{array}{l} \mathbf{if}\;a \leq 2.6 \cdot 10^{+67}:\\ \;\;\;\;\frac{\frac{x}{a}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot a}\\ \end{array} \]
Alternative 17
Error38.9
Cost452
\[\begin{array}{l} \mathbf{if}\;a \leq 5 \cdot 10^{-37}:\\ \;\;\;\;\frac{\frac{x}{y}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot a}\\ \end{array} \]
Alternative 18
Error41.8
Cost320
\[\frac{x}{y \cdot a} \]

Error

Reproduce

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