?

Average Error: 0.1 → 0.1
Time: 1.3min
Precision: binary64
Cost: 7360

?

\[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
\[\left(\left(1 - \log t\right) \cdot z + \left(y + x\right)\right) + \left(a - 0.5\right) \cdot b \]
(FPCore (x y z t a b)
 :precision binary64
 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
(FPCore (x y z t a b)
 :precision binary64
 (+ (+ (* (- 1.0 (log t)) z) (+ y x)) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
	return (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
}
double code(double x, double y, double z, double t, double a, double b) {
	return (((1.0 - log(t)) * z) + (y + x)) + ((a - 0.5) * b);
}
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 + y) + z) - (z * log(t))) + ((a - 0.5d0) * b)
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 = (((1.0d0 - log(t)) * z) + (y + x)) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return (((x + y) + z) - (z * Math.log(t))) + ((a - 0.5) * b);
}
public static double code(double x, double y, double z, double t, double a, double b) {
	return (((1.0 - Math.log(t)) * z) + (y + x)) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b):
	return (((x + y) + z) - (z * math.log(t))) + ((a - 0.5) * b)
def code(x, y, z, t, a, b):
	return (((1.0 - math.log(t)) * z) + (y + x)) + ((a - 0.5) * b)
function code(x, y, z, t, a, b)
	return Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b))
end
function code(x, y, z, t, a, b)
	return Float64(Float64(Float64(Float64(1.0 - log(t)) * z) + Float64(y + x)) + Float64(Float64(a - 0.5) * b))
end
function tmp = code(x, y, z, t, a, b)
	tmp = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
end
function tmp = code(x, y, z, t, a, b)
	tmp = (((1.0 - log(t)) * z) + (y + x)) + ((a - 0.5) * b);
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision] + N[(y + x), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\left(\left(1 - \log t\right) \cdot z + \left(y + x\right)\right) + \left(a - 0.5\right) \cdot b

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.1
Target0.4
Herbie0.1
\[\left(\left(x + y\right) + \frac{\left(1 - {\log t}^{2}\right) \cdot z}{1 + \log t}\right) + \left(a - 0.5\right) \cdot b \]

Derivation?

  1. Initial program 0.1

    \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
  2. Taylor expanded in z around 0 0.1

    \[\leadsto \color{blue}{\left(\left(1 - \log t\right) \cdot z + \left(y + x\right)\right)} + \left(a - 0.5\right) \cdot b \]

Alternatives

Alternative 1
Error4.8
Cost8008
\[\begin{array}{l} t_1 := \left(a - 0.5\right) \cdot b\\ t_2 := \left(y + x\right) + t_1\\ \mathbf{if}\;t_1 \leq -1 \cdot 10^{+163}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq 8 \cdot 10^{+122}:\\ \;\;\;\;\left(-0.5 \cdot b + \left(y + \left(z + x\right)\right)\right) - z \cdot \log t\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 2
Error6.5
Cost7752
\[\begin{array}{l} t_1 := \left(a - 0.5\right) \cdot b\\ t_2 := \left(y + x\right) + t_1\\ \mathbf{if}\;t_1 \leq -1 \cdot 10^{+84}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq 10^{+88}:\\ \;\;\;\;\left(1 - \log t\right) \cdot z + \left(y + x\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 3
Error8.9
Cost7112
\[\begin{array}{l} t_1 := \left(1 - \log t\right) \cdot z + x\\ \mathbf{if}\;z \leq -2.4 \cdot 10^{+121}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{+174}:\\ \;\;\;\;\left(y + x\right) + \left(a - 0.5\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 4
Error9.9
Cost7112
\[\begin{array}{l} t_1 := \left(1 - \log t\right) \cdot z + y\\ \mathbf{if}\;z \leq -4.8 \cdot 10^{+52}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{+171}:\\ \;\;\;\;\left(y + x\right) + \left(a - 0.5\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 5
Error10.2
Cost6984
\[\begin{array}{l} t_1 := \left(1 - \log t\right) \cdot z\\ \mathbf{if}\;z \leq -4.5 \cdot 10^{+167}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{+201}:\\ \;\;\;\;\left(y + x\right) + \left(a - 0.5\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 6
Error25.2
Cost1096
\[\begin{array}{l} t_1 := \left(a - 0.5\right) \cdot b\\ \mathbf{if}\;t_1 \leq -2 \cdot 10^{+185}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 10^{+123}:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 7
Error22.9
Cost976
\[\begin{array}{l} t_1 := x + \left(a - 0.5\right) \cdot b\\ \mathbf{if}\;y \leq -1.15 \cdot 10^{+134}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{-55}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{+44}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;y \leq 3.3 \cdot 10^{+103}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]
Alternative 8
Error23.0
Cost976
\[\begin{array}{l} t_1 := \left(a - 0.5\right) \cdot b\\ t_2 := x + t_1\\ \mathbf{if}\;y \leq -1.85 \cdot 10^{-25}:\\ \;\;\;\;y + t_1\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{-55}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{+44}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;y \leq 6.7 \cdot 10^{+109}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]
Alternative 9
Error39.7
Cost856
\[\begin{array}{l} \mathbf{if}\;x \leq -9.2 \cdot 10^{+86}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -1.55 \cdot 10^{-299}:\\ \;\;\;\;y\\ \mathbf{elif}\;x \leq 4.1 \cdot 10^{-248}:\\ \;\;\;\;-0.5 \cdot b\\ \mathbf{elif}\;x \leq 1.9 \cdot 10^{-38}:\\ \;\;\;\;y\\ \mathbf{elif}\;x \leq 7 \cdot 10^{-11}:\\ \;\;\;\;-0.5 \cdot b\\ \mathbf{elif}\;x \leq 1.06 \cdot 10^{+178}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 10
Error15.7
Cost576
\[\left(y + x\right) + \left(a - 0.5\right) \cdot b \]
Alternative 11
Error29.9
Cost456
\[\begin{array}{l} \mathbf{if}\;b \leq -7.8 \cdot 10^{+105}:\\ \;\;\;\;-0.5 \cdot b\\ \mathbf{elif}\;b \leq 4 \cdot 10^{+174}:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot b\\ \end{array} \]
Alternative 12
Error39.0
Cost328
\[\begin{array}{l} \mathbf{if}\;x \leq -1.86 \cdot 10^{+87}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.06 \cdot 10^{+178}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 13
Error48.2
Cost64
\[x \]

Error

Reproduce?

herbie shell --seed 2023033 
(FPCore (x y z t a b)
  :name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, A"
  :precision binary64

  :herbie-target
  (+ (+ (+ x y) (/ (* (- 1.0 (pow (log t) 2.0)) z) (+ 1.0 (log t)))) (* (- a 0.5) b))

  (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))