?

Average Error: 0.1 → 0.1
Time: 14.1s
Precision: binary64
Cost: 7104

?

\[x \cdot 0.5 + y \cdot \left(\left(1 - z\right) + \log z\right) \]
\[x \cdot 0.5 + y \cdot \left(\left(1 - z\right) + \log z\right) \]
(FPCore (x y z) :precision binary64 (+ (* x 0.5) (* y (+ (- 1.0 z) (log z)))))
(FPCore (x y z) :precision binary64 (+ (* x 0.5) (* y (+ (- 1.0 z) (log z)))))
double code(double x, double y, double z) {
	return (x * 0.5) + (y * ((1.0 - z) + log(z)));
}
double code(double x, double y, double z) {
	return (x * 0.5) + (y * ((1.0 - z) + log(z)));
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = (x * 0.5d0) + (y * ((1.0d0 - z) + log(z)))
end function
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = (x * 0.5d0) + (y * ((1.0d0 - z) + log(z)))
end function
public static double code(double x, double y, double z) {
	return (x * 0.5) + (y * ((1.0 - z) + Math.log(z)));
}
public static double code(double x, double y, double z) {
	return (x * 0.5) + (y * ((1.0 - z) + Math.log(z)));
}
def code(x, y, z):
	return (x * 0.5) + (y * ((1.0 - z) + math.log(z)))
def code(x, y, z):
	return (x * 0.5) + (y * ((1.0 - z) + math.log(z)))
function code(x, y, z)
	return Float64(Float64(x * 0.5) + Float64(y * Float64(Float64(1.0 - z) + log(z))))
end
function code(x, y, z)
	return Float64(Float64(x * 0.5) + Float64(y * Float64(Float64(1.0 - z) + log(z))))
end
function tmp = code(x, y, z)
	tmp = (x * 0.5) + (y * ((1.0 - z) + log(z)));
end
function tmp = code(x, y, z)
	tmp = (x * 0.5) + (y * ((1.0 - z) + log(z)));
end
code[x_, y_, z_] := N[(N[(x * 0.5), $MachinePrecision] + N[(y * N[(N[(1.0 - z), $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_] := N[(N[(x * 0.5), $MachinePrecision] + N[(y * N[(N[(1.0 - z), $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
x \cdot 0.5 + y \cdot \left(\left(1 - z\right) + \log z\right)
x \cdot 0.5 + y \cdot \left(\left(1 - z\right) + \log z\right)

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.1
Target0.1
Herbie0.1
\[\left(y + 0.5 \cdot x\right) - y \cdot \left(z - \log z\right) \]

Derivation?

  1. Initial program 0.1

    \[x \cdot 0.5 + y \cdot \left(\left(1 - z\right) + \log z\right) \]
  2. Final simplification0.1

    \[\leadsto x \cdot 0.5 + y \cdot \left(\left(1 - z\right) + \log z\right) \]

Alternatives

Alternative 1
Error14.3
Cost7248
\[\begin{array}{l} t_0 := y \cdot \log z + y\\ t_1 := x \cdot 0.5 - z \cdot y\\ \mathbf{if}\;y \leq -2.8 \cdot 10^{+218}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y \leq -6.5 \cdot 10^{+168}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -4.2 \cdot 10^{+136}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y \leq 2.35 \cdot 10^{+174}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 2
Error10.6
Cost7112
\[\begin{array}{l} t_0 := y \cdot \left(\left(1 + \log z\right) - z\right)\\ \mathbf{if}\;y \leq -5.2 \cdot 10^{+53}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y \leq 0.00122:\\ \;\;\;\;x \cdot 0.5 - z \cdot y\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 3
Error0.9
Cost7108
\[\begin{array}{l} \mathbf{if}\;z \leq 0.55:\\ \;\;\;\;x \cdot 0.5 + \left(\log z + 1\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;\left(y - y \cdot z\right) - x \cdot -0.5\\ \end{array} \]
Alternative 4
Error29.9
Cost784
\[\begin{array}{l} t_0 := z \cdot \left(-y\right)\\ \mathbf{if}\;x \leq -3.5 \cdot 10^{+60}:\\ \;\;\;\;0.5 \cdot x\\ \mathbf{elif}\;x \leq -3.7 \cdot 10^{-22}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq -9 \cdot 10^{-125}:\\ \;\;\;\;0.5 \cdot x\\ \mathbf{elif}\;x \leq 1200000000:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot x\\ \end{array} \]
Alternative 5
Error18.0
Cost448
\[x \cdot 0.5 - z \cdot y \]
Alternative 6
Error34.6
Cost192
\[0.5 \cdot x \]

Error

Reproduce?

herbie shell --seed 2023090 
(FPCore (x y z)
  :name "System.Random.MWC.Distributions:gamma from mwc-random-0.13.3.2"
  :precision binary64

  :herbie-target
  (- (+ y (* 0.5 x)) (* y (- z (log z))))

  (+ (* x 0.5) (* y (+ (- 1.0 z) (log z)))))