?

Average Accuracy: 96.9% → 96.9%
Time: 33.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

Original96.9%
Target82.0%
Herbie96.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 96.9%

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

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

Alternatives

Alternative 1
Accuracy87.6%
Cost27016
\[\begin{array}{l} t_1 := \left(t + -1\right) \cdot \log a\\ t_2 := a \cdot e^{b}\\ \mathbf{if}\;t_1 \leq -635:\\ \;\;\;\;\frac{x \cdot \frac{{a}^{t}}{a}}{y}\\ \mathbf{elif}\;t_1 \leq 500:\\ \;\;\;\;\frac{x \cdot {z}^{y}}{y \cdot t_2}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t_2}}{y}\\ \end{array} \]
Alternative 2
Accuracy96.1%
Cost26692
\[\begin{array}{l} \mathbf{if}\;\left(t + -1\right) \cdot \log a \leq -648:\\ \;\;\;\;\frac{x \cdot \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
Accuracy80.0%
Cost14233
\[\begin{array}{l} t_1 := x \cdot \frac{{a}^{t}}{y \cdot a}\\ \mathbf{if}\;t \leq -1.2 \cdot 10^{+204}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -5 \cdot 10^{+130}:\\ \;\;\;\;\frac{x}{a \cdot \left(y \cdot \left(1 + \left(b + 0.5 \cdot \left(b \cdot b\right)\right)\right)\right)}\\ \mathbf{elif}\;t \leq -4.6 \cdot 10^{+52}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 0.0003 \lor \neg \left(t \leq 4.6 \cdot 10^{+42}\right) \land t \leq 9.5 \cdot 10^{+80}:\\ \;\;\;\;\frac{x \cdot \frac{\frac{{z}^{y}}{a}}{e^{b}}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \frac{{a}^{t}}{a}}{y}\\ \end{array} \]
Alternative 4
Accuracy83.3%
Cost13836
\[\begin{array}{l} \mathbf{if}\;b \leq 9.5 \cdot 10^{-91}:\\ \;\;\;\;\frac{x \cdot \frac{{a}^{t}}{a}}{y}\\ \mathbf{elif}\;b \leq 3.7 \cdot 10^{-13}:\\ \;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\ \mathbf{elif}\;b \leq 1000:\\ \;\;\;\;x \cdot \frac{{a}^{t}}{y \cdot \left(a \cdot e^{b}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\ \end{array} \]
Alternative 5
Accuracy72.4%
Cost7376
\[\begin{array}{l} t_1 := \left(1 + \frac{x}{y \cdot a}\right) + -1\\ \mathbf{if}\;b \leq -9.2 \cdot 10^{+123}:\\ \;\;\;\;\frac{x}{0.5 \cdot \left(y \cdot \left(a \cdot \left(b \cdot b\right)\right)\right)}\\ \mathbf{elif}\;b \leq 5.8 \cdot 10^{-216}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 9.4 \cdot 10^{-163}:\\ \;\;\;\;\frac{1}{a} \cdot \frac{1}{\frac{y}{x}}\\ \mathbf{elif}\;b \leq 4 \cdot 10^{-35}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\ \end{array} \]
Alternative 6
Accuracy83.1%
Cost7308
\[\begin{array}{l} \mathbf{if}\;b \leq 7 \cdot 10^{-91}:\\ \;\;\;\;\frac{x \cdot \frac{{a}^{t}}{a}}{y}\\ \mathbf{elif}\;b \leq 1.1 \cdot 10^{-13}:\\ \;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\ \mathbf{elif}\;b \leq 200:\\ \;\;\;\;x \cdot \frac{{a}^{t}}{y \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\ \end{array} \]
Alternative 7
Accuracy82.1%
Cost7176
\[\begin{array}{l} \mathbf{if}\;b \leq -6.2 \cdot 10^{+119}:\\ \;\;\;\;\frac{x}{0.5 \cdot \left(y \cdot \left(a \cdot \left(b \cdot b\right)\right)\right)}\\ \mathbf{elif}\;b \leq 2.5 \cdot 10^{-20}:\\ \;\;\;\;x \cdot \frac{{a}^{t}}{y \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\ \end{array} \]
Alternative 8
Accuracy83.2%
Cost7044
\[\begin{array}{l} \mathbf{if}\;b \leq 2.5 \cdot 10^{-20}:\\ \;\;\;\;\frac{x \cdot \frac{{a}^{t}}{a}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\ \end{array} \]
Alternative 9
Accuracy60.4%
Cost1232
\[\begin{array}{l} t_1 := \left(1 + \frac{x}{y \cdot a}\right) + -1\\ t_2 := \frac{2}{y} \cdot \frac{x}{b \cdot \left(a \cdot b\right)}\\ \mathbf{if}\;b \leq -1.7 \cdot 10^{+20}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 5.05 \cdot 10^{-216}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 9.4 \cdot 10^{-163}:\\ \;\;\;\;\frac{1}{a} \cdot \frac{1}{\frac{y}{x}}\\ \mathbf{elif}\;b \leq 5.5 \cdot 10^{+23}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 10
Accuracy63.9%
Cost1232
\[\begin{array}{l} t_1 := \left(1 + \frac{x}{y \cdot a}\right) + -1\\ t_2 := \frac{x}{0.5 \cdot \left(y \cdot \left(a \cdot \left(b \cdot b\right)\right)\right)}\\ \mathbf{if}\;b \leq -4.5 \cdot 10^{+121}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 5.8 \cdot 10^{-216}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 9.4 \cdot 10^{-163}:\\ \;\;\;\;\frac{1}{a} \cdot \frac{1}{\frac{y}{x}}\\ \mathbf{elif}\;b \leq 5.5 \cdot 10^{+23}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 11
Accuracy52.9%
Cost972
\[\begin{array}{l} t_1 := \left(1 + \frac{x}{y \cdot a}\right) + -1\\ \mathbf{if}\;b \leq 5.7 \cdot 10^{-216}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 1.02 \cdot 10^{-162}:\\ \;\;\;\;\frac{1}{a} \cdot \frac{1}{\frac{y}{x}}\\ \mathbf{elif}\;b \leq 3.3 \cdot 10^{+202}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a \cdot \left(y \cdot b\right)}\\ \end{array} \]
Alternative 12
Accuracy46.0%
Cost841
\[\begin{array}{l} \mathbf{if}\;b \leq -1.05 \lor \neg \left(b \leq 0.0036\right):\\ \;\;\;\;\frac{x}{a \cdot \left(y \cdot b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{a} \cdot \frac{1}{\frac{y}{x}}\\ \end{array} \]
Alternative 13
Accuracy56.1%
Cost841
\[\begin{array}{l} \mathbf{if}\;y \leq -1 \cdot 10^{+35} \lor \neg \left(y \leq 4 \cdot 10^{-26}\right):\\ \;\;\;\;\left(1 + \frac{x}{y \cdot a}\right) + -1\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(1 + \frac{x}{a}\right) + -1}{y}\\ \end{array} \]
Alternative 14
Accuracy45.8%
Cost713
\[\begin{array}{l} \mathbf{if}\;b \leq -1 \lor \neg \left(b \leq 0.0065\right):\\ \;\;\;\;\frac{x}{a \cdot \left(y \cdot b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{a}\\ \end{array} \]
Alternative 15
Accuracy34.9%
Cost452
\[\begin{array}{l} \mathbf{if}\;y \leq 10^{-54}:\\ \;\;\;\;\frac{\frac{x}{a}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot a}\\ \end{array} \]
Alternative 16
Accuracy39.2%
Cost452
\[\begin{array}{l} \mathbf{if}\;a \leq 7.5 \cdot 10^{-67}:\\ \;\;\;\;\frac{\frac{x}{y}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot a}\\ \end{array} \]
Alternative 17
Accuracy34.3%
Cost320
\[\frac{x}{y \cdot a} \]

Error

Reproduce?

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