Average Error: 2.0 → 2.0
Time: 37.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
Target10.9
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
Error2.4
Cost26692
\[\begin{array}{l} \mathbf{if}\;\left(t + -1\right) \cdot \log a \leq -595:\\ \;\;\;\;\frac{x}{\frac{y}{\frac{{a}^{t}}{a}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot e^{\left(y \cdot \log z - \log a\right) - b}}{y}\\ \end{array} \]
Alternative 2
Error7.1
Cost20228
\[\begin{array}{l} \mathbf{if}\;\left(t + -1\right) \cdot \log a \leq -450:\\ \;\;\;\;\frac{x}{\frac{y}{\frac{{a}^{t}}{a}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot {z}^{y}}{y \cdot \left(a \cdot e^{b}\right)}\\ \end{array} \]
Alternative 3
Error12.2
Cost8080
\[\begin{array}{l} t_1 := \frac{{z}^{y}}{a}\\ t_2 := x \cdot \frac{t_1}{y}\\ t_3 := \frac{x}{\frac{y}{\frac{{a}^{t}}{a}}}\\ \mathbf{if}\;b \leq -9 \cdot 10^{+90}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq 3.4 \cdot 10^{-295}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 2.35 \cdot 10^{-161}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq 3.3 \cdot 10^{-101}:\\ \;\;\;\;\frac{x \cdot \left(t_1 \cdot \left(\left(1 + 0.5 \cdot \left(b \cdot b\right)\right) - b\right)\right)}{y}\\ \mathbf{elif}\;b \leq 1.25 \cdot 10^{-71}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq 1.45 \cdot 10^{-8}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot e^{b}}\\ \end{array} \]
Alternative 4
Error12.2
Cost7704
\[\begin{array}{l} t_1 := \frac{{z}^{y}}{a}\\ t_2 := x \cdot \frac{t_1}{y}\\ t_3 := \frac{x}{\frac{y}{\frac{{a}^{t}}{a}}}\\ \mathbf{if}\;b \leq -9 \cdot 10^{+90}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq 3.4 \cdot 10^{-295}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 2.35 \cdot 10^{-161}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq 3.3 \cdot 10^{-101}:\\ \;\;\;\;\frac{t_1 \cdot \left(x - x \cdot b\right)}{y}\\ \mathbf{elif}\;b \leq 1.25 \cdot 10^{-71}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq 1.45 \cdot 10^{-8}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot e^{b}}\\ \end{array} \]
Alternative 5
Error12.0
Cost7440
\[\begin{array}{l} t_1 := x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\ t_2 := \frac{x}{\frac{y}{\frac{{a}^{t}}{a}}}\\ \mathbf{if}\;b \leq -9 \cdot 10^{+90}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 3.4 \cdot 10^{-295}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 1.25 \cdot 10^{-71}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 1.45 \cdot 10^{-8}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot e^{b}}\\ \end{array} \]
Alternative 6
Error13.2
Cost7044
\[\begin{array}{l} \mathbf{if}\;b \leq 8.2 \cdot 10^{-39}:\\ \;\;\;\;\frac{\frac{{a}^{t}}{y}}{\frac{a}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \left(a \cdot e^{b}\right)}\\ \end{array} \]
Alternative 7
Error10.6
Cost7044
\[\begin{array}{l} \mathbf{if}\;b \leq 8.2 \cdot 10^{-39}:\\ \;\;\;\;\frac{x}{\frac{y}{\frac{{a}^{t}}{a}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \left(a \cdot e^{b}\right)}\\ \end{array} \]
Alternative 8
Error17.7
Cost6852
\[\begin{array}{l} \mathbf{if}\;b \leq 1.45 \cdot 10^{-8}:\\ \;\;\;\;\left(1 + \frac{x}{y \cdot a}\right) + -1\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot e^{b}}\\ \end{array} \]
Alternative 9
Error43.3
Cost908
\[\begin{array}{l} \mathbf{if}\;z \leq 1.15 \cdot 10^{+101}:\\ \;\;\;\;\frac{x}{y \cdot a}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+179}:\\ \;\;\;\;\frac{b}{a} \cdot \frac{-x}{y}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{+216}:\\ \;\;\;\;\frac{\frac{1}{y}}{\frac{a}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{y} \cdot \frac{x}{a}\\ \end{array} \]
Alternative 10
Error28.3
Cost840
\[\begin{array}{l} t_1 := \left(1 + \frac{x}{y \cdot a}\right) + -1\\ \mathbf{if}\;y \leq -540000000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 4200:\\ \;\;\;\;\frac{x}{y \cdot \left(a + a \cdot b\right)}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 11
Error40.7
Cost584
\[\begin{array}{l} t_1 := \frac{\frac{x}{y}}{a}\\ \mathbf{if}\;y \leq -1.6 \cdot 10^{-195}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 10^{-10}:\\ \;\;\;\;\frac{\frac{x}{a}}{y}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 12
Error38.3
Cost584
\[\begin{array}{l} t_1 := \frac{x}{y \cdot a}\\ \mathbf{if}\;x \leq -1.166316924240209 \cdot 10^{-40}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 8.664599272763472 \cdot 10^{-70}:\\ \;\;\;\;\frac{\frac{x}{y}}{a}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 13
Error29.9
Cost576
\[\left(1 + \frac{x}{y \cdot a}\right) + -1 \]
Alternative 14
Error41.9
Cost320
\[\frac{\frac{x}{y}}{a} \]

Error

Reproduce

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