?

Average Error: 3.07% → 3.07%
Time: 33.0s
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

Original3.07%
Target16.99%
Herbie3.07%
\[\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 3.07

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

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

Alternatives

Alternative 1
Error14.12%
Cost33804
\[\begin{array}{l} t_1 := \left(t + -1\right) \cdot \log a\\ t_2 := y \cdot e^{b}\\ \mathbf{if}\;t_1 \leq -670:\\ \;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\ \mathbf{elif}\;t_1 \leq 25:\\ \;\;\;\;x \cdot \frac{{z}^{y}}{a \cdot t_2}\\ \mathbf{elif}\;t_1 \leq 610:\\ \;\;\;\;\frac{{a}^{t}}{a} \cdot \frac{x}{t_2}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{1}{y \cdot \frac{a \cdot \left(1 - b \cdot b\right)}{1 - b}}\\ \end{array} \]
Alternative 2
Error3.48%
Cost26692
\[\begin{array}{l} \mathbf{if}\;\left(t + -1\right) \cdot \log a \leq -1000000:\\ \;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot e^{\left(y \cdot \log z - \log a\right) - b}}{y}\\ \end{array} \]
Alternative 3
Error21.24%
Cost7704
\[\begin{array}{l} t_1 := \frac{{a}^{t}}{a} \cdot \frac{x}{y}\\ \mathbf{if}\;b \leq -3.7 \cdot 10^{+57}:\\ \;\;\;\;x \cdot \frac{1}{y \cdot \frac{a \cdot \left(1 - b \cdot b\right)}{1 - b}}\\ \mathbf{elif}\;b \leq -1.9 \cdot 10^{-168}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -1.32 \cdot 10^{-197}:\\ \;\;\;\;0.5 \cdot \left(\frac{b \cdot b}{y} \cdot \frac{x}{a}\right)\\ \mathbf{elif}\;b \leq 10^{-259}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 9.2 \cdot 10^{-182}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{b \cdot b}{y \cdot a}\right)\\ \mathbf{elif}\;b \leq 4.3 \cdot 10^{-26}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\ \end{array} \]
Alternative 4
Error21.15%
Cost7572
\[\begin{array}{l} t_1 := \frac{{a}^{t}}{a} \cdot \frac{x}{y}\\ \mathbf{if}\;b \leq -1.3 \cdot 10^{+63}:\\ \;\;\;\;x \cdot \frac{1}{y \cdot \frac{a \cdot \left(1 - b \cdot b\right)}{1 - b}}\\ \mathbf{elif}\;b \leq 1.3 \cdot 10^{-308}:\\ \;\;\;\;x \cdot \frac{{z}^{y}}{y \cdot a}\\ \mathbf{elif}\;b \leq 1.1 \cdot 10^{-263}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 5.6 \cdot 10^{-186}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{b \cdot b}{y \cdot a}\right)\\ \mathbf{elif}\;b \leq 1.3 \cdot 10^{-26}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\ \end{array} \]
Alternative 5
Error18.72%
Cost7572
\[\begin{array}{l} t_1 := \frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\ \mathbf{if}\;b \leq -1.3 \cdot 10^{+63}:\\ \;\;\;\;x \cdot \frac{1}{y \cdot \frac{a \cdot \left(1 - b \cdot b\right)}{1 - b}}\\ \mathbf{elif}\;b \leq -1.25 \cdot 10^{-167}:\\ \;\;\;\;x \cdot \frac{{z}^{y}}{y \cdot a}\\ \mathbf{elif}\;b \leq 5.5 \cdot 10^{-199}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 2.7 \cdot 10^{-115}:\\ \;\;\;\;\frac{\frac{x \cdot {z}^{y}}{a}}{y}\\ \mathbf{elif}\;b \leq 4.3 \cdot 10^{-26}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\ \end{array} \]
Alternative 6
Error29.44%
Cost7376
\[\begin{array}{l} \mathbf{if}\;b \leq -5.2 \cdot 10^{-119}:\\ \;\;\;\;x \cdot \frac{1}{y \cdot \frac{a \cdot \left(1 - b \cdot b\right)}{1 - b}}\\ \mathbf{elif}\;b \leq -6.5 \cdot 10^{-197}:\\ \;\;\;\;0.5 \cdot \left(\frac{b \cdot b}{y} \cdot \frac{x}{a}\right)\\ \mathbf{elif}\;b \leq -9 \cdot 10^{-248}:\\ \;\;\;\;x \cdot \frac{1}{y \cdot a}\\ \mathbf{elif}\;b \leq 5.5 \cdot 10^{-76}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{b \cdot b}{y \cdot a}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\ \end{array} \]
Alternative 7
Error29.89%
Cost7376
\[\begin{array}{l} \mathbf{if}\;b \leq -1.16 \cdot 10^{-116}:\\ \;\;\;\;x \cdot \frac{1}{y \cdot \frac{a \cdot \left(1 - b \cdot b\right)}{1 - b}}\\ \mathbf{elif}\;b \leq -3.8 \cdot 10^{-194}:\\ \;\;\;\;0.5 \cdot \left(\frac{b \cdot b}{y} \cdot \frac{x}{a}\right)\\ \mathbf{elif}\;b \leq -8 \cdot 10^{-241}:\\ \;\;\;\;x \cdot \frac{1}{y \cdot a}\\ \mathbf{elif}\;b \leq 2.4 \cdot 10^{-181}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{b \cdot b}{y \cdot a}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\ \end{array} \]
Alternative 8
Error18.49%
Cost7308
\[\begin{array}{l} \mathbf{if}\;b \leq -1.3 \cdot 10^{+63}:\\ \;\;\;\;x \cdot \frac{1}{y \cdot \frac{a \cdot \left(1 - b \cdot b\right)}{1 - b}}\\ \mathbf{elif}\;b \leq -5.8 \cdot 10^{-167}:\\ \;\;\;\;x \cdot \frac{{z}^{y}}{y \cdot a}\\ \mathbf{elif}\;b \leq 4.3 \cdot 10^{-26}:\\ \;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\ \end{array} \]
Alternative 9
Error43.34%
Cost1616
\[\begin{array}{l} t_1 := \frac{1}{y \cdot a}\\ t_2 := x \cdot \left(\left(1 - b\right) \cdot \frac{t_1}{1 - b \cdot b}\right)\\ \mathbf{if}\;b \leq -4.7 \cdot 10^{-117}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -2.05 \cdot 10^{-197}:\\ \;\;\;\;0.5 \cdot \left(\frac{b \cdot b}{y} \cdot \frac{x}{a}\right)\\ \mathbf{elif}\;b \leq -1.6 \cdot 10^{-238}:\\ \;\;\;\;x \cdot t_1\\ \mathbf{elif}\;b \leq 1.15 \cdot 10^{-75}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{b \cdot b}{y \cdot a}\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 10
Error39.44%
Cost1616
\[\begin{array}{l} t_1 := x \cdot \frac{1}{y \cdot \frac{a \cdot \left(1 - b \cdot b\right)}{1 - b}}\\ \mathbf{if}\;b \leq -1.12 \cdot 10^{-116}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -2.25 \cdot 10^{-197}:\\ \;\;\;\;0.5 \cdot \left(\frac{b \cdot b}{y} \cdot \frac{x}{a}\right)\\ \mathbf{elif}\;b \leq -1.6 \cdot 10^{-238}:\\ \;\;\;\;x \cdot \frac{1}{y \cdot a}\\ \mathbf{elif}\;b \leq 1.5 \cdot 10^{-75}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{b \cdot b}{y \cdot a}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 11
Error52.91%
Cost1232
\[\begin{array}{l} t_1 := 0.5 \cdot \left(\frac{b \cdot b}{y} \cdot \frac{x}{a}\right)\\ \mathbf{if}\;b \leq -1 \cdot 10^{-166}:\\ \;\;\;\;\frac{x}{y} \cdot \frac{1}{a}\\ \mathbf{elif}\;b \leq -2.25 \cdot 10^{-197}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -3.5 \cdot 10^{-241}:\\ \;\;\;\;x \cdot \frac{1}{y \cdot a}\\ \mathbf{elif}\;b \leq 3.9 \cdot 10^{-180}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{a + a \cdot b}}{y}\\ \end{array} \]
Alternative 12
Error52.1%
Cost1232
\[\begin{array}{l} \mathbf{if}\;b \leq -2.3 \cdot 10^{-167}:\\ \;\;\;\;\frac{x}{y} \cdot \frac{1}{a}\\ \mathbf{elif}\;b \leq -2.05 \cdot 10^{-197}:\\ \;\;\;\;0.5 \cdot \left(\frac{b \cdot b}{y} \cdot \frac{x}{a}\right)\\ \mathbf{elif}\;b \leq -1 \cdot 10^{-238}:\\ \;\;\;\;x \cdot \frac{1}{y \cdot a}\\ \mathbf{elif}\;b \leq 7.8 \cdot 10^{-76}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{b \cdot b}{y \cdot a}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \left(a \cdot \left(1 + b\right)\right)}\\ \end{array} \]
Alternative 13
Error52.25%
Cost1232
\[\begin{array}{l} \mathbf{if}\;b \leq -1.35 \cdot 10^{-167}:\\ \;\;\;\;\frac{x}{y} \cdot \frac{1}{a}\\ \mathbf{elif}\;b \leq -2.05 \cdot 10^{-197}:\\ \;\;\;\;0.5 \cdot \left(\frac{b \cdot b}{y} \cdot \frac{x}{a}\right)\\ \mathbf{elif}\;b \leq -4.2 \cdot 10^{-241}:\\ \;\;\;\;x \cdot \frac{1}{y \cdot a}\\ \mathbf{elif}\;b \leq 8.6 \cdot 10^{-76}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{b \cdot b}{y \cdot a}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{1}{y \cdot \left(a \cdot \left(1 + b\right)\right)}\\ \end{array} \]
Alternative 14
Error50.01%
Cost1232
\[\begin{array}{l} \mathbf{if}\;b \leq -2.7 \cdot 10^{-167}:\\ \;\;\;\;\frac{x \cdot \frac{\frac{1}{y}}{1 + b}}{a}\\ \mathbf{elif}\;b \leq -2.45 \cdot 10^{-194}:\\ \;\;\;\;0.5 \cdot \left(\frac{b \cdot b}{y} \cdot \frac{x}{a}\right)\\ \mathbf{elif}\;b \leq -1.1 \cdot 10^{-238}:\\ \;\;\;\;x \cdot \frac{1}{y \cdot a}\\ \mathbf{elif}\;b \leq 5.1 \cdot 10^{-76}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{b \cdot b}{y \cdot a}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{1}{y \cdot \left(a \cdot \left(1 + b\right)\right)}\\ \end{array} \]
Alternative 15
Error53.41%
Cost841
\[\begin{array}{l} \mathbf{if}\;x \leq -1.65 \cdot 10^{-75} \lor \neg \left(x \leq 2.55 \cdot 10^{-260}\right):\\ \;\;\;\;\frac{x}{a \cdot \left(y \cdot \left(1 + b\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{a}\\ \end{array} \]
Alternative 16
Error60.61%
Cost712
\[\begin{array}{l} \mathbf{if}\;x \leq -0.2:\\ \;\;\;\;\frac{x}{y \cdot a}\\ \mathbf{elif}\;x \leq 1.5 \cdot 10^{-111}:\\ \;\;\;\;\frac{\frac{x}{y}}{a}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{1}{y \cdot a}\\ \end{array} \]
Alternative 17
Error57.28%
Cost712
\[\begin{array}{l} \mathbf{if}\;b \leq -2.15 \cdot 10^{-290}:\\ \;\;\;\;\frac{\frac{x}{y}}{a}\\ \mathbf{elif}\;b \leq 1650000000:\\ \;\;\;\;\frac{x}{a} \cdot \frac{1}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a \cdot \left(y \cdot b\right)}\\ \end{array} \]
Alternative 18
Error56.58%
Cost712
\[\begin{array}{l} \mathbf{if}\;b \leq -2.55 \cdot 10^{-290}:\\ \;\;\;\;\frac{\frac{x}{y}}{a}\\ \mathbf{elif}\;b \leq 1020000000:\\ \;\;\;\;\frac{x}{a} \cdot \frac{1}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \left(a \cdot b\right)}\\ \end{array} \]
Alternative 19
Error50.93%
Cost708
\[\begin{array}{l} \mathbf{if}\;a \leq 4.3 \cdot 10^{-62}:\\ \;\;\;\;\frac{\frac{x}{y}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \left(a \cdot \left(1 + b\right)\right)}\\ \end{array} \]
Alternative 20
Error65.04%
Cost585
\[\begin{array}{l} \mathbf{if}\;a \leq 9 \cdot 10^{-62} \lor \neg \left(a \leq 8 \cdot 10^{+207}\right):\\ \;\;\;\;\frac{\frac{x}{a}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot a}\\ \end{array} \]
Alternative 21
Error60.2%
Cost452
\[\begin{array}{l} \mathbf{if}\;a \leq 3.8 \cdot 10^{-28}:\\ \;\;\;\;\frac{\frac{x}{y}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot a}\\ \end{array} \]
Alternative 22
Error65.13%
Cost320
\[\frac{x}{y \cdot a} \]

Error

Reproduce?

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