
(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)));
}
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)));
}
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 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]
\begin{array}{l}
\\
x \cdot 0.5 + y \cdot \left(\left(1 - z\right) + \log z\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 9 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(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)));
}
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)));
}
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 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]
\begin{array}{l}
\\
x \cdot 0.5 + y \cdot \left(\left(1 - z\right) + \log z\right)
\end{array}
(FPCore (x y z) :precision binary64 (+ (* x 0.5) (+ (- (* y 2.0) (* y z)) (* y (- -1.0 (log (/ 1.0 z)))))))
double code(double x, double y, double z) {
return (x * 0.5) + (((y * 2.0) - (y * z)) + (y * (-1.0 - log((1.0 / 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 * 2.0d0) - (y * z)) + (y * ((-1.0d0) - log((1.0d0 / z)))))
end function
public static double code(double x, double y, double z) {
return (x * 0.5) + (((y * 2.0) - (y * z)) + (y * (-1.0 - Math.log((1.0 / z)))));
}
def code(x, y, z): return (x * 0.5) + (((y * 2.0) - (y * z)) + (y * (-1.0 - math.log((1.0 / z)))))
function code(x, y, z) return Float64(Float64(x * 0.5) + Float64(Float64(Float64(y * 2.0) - Float64(y * z)) + Float64(y * Float64(-1.0 - log(Float64(1.0 / z)))))) end
function tmp = code(x, y, z) tmp = (x * 0.5) + (((y * 2.0) - (y * z)) + (y * (-1.0 - log((1.0 / z))))); end
code[x_, y_, z_] := N[(N[(x * 0.5), $MachinePrecision] + N[(N[(N[(y * 2.0), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(y * N[(-1.0 - N[Log[N[(1.0 / z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot 0.5 + \left(\left(y \cdot 2 - y \cdot z\right) + y \cdot \left(-1 - \log \left(\frac{1}{z}\right)\right)\right)
\end{array}
Initial program 99.9%
*-commutative99.9%
flip-+83.7%
associate-*l/81.6%
pow281.6%
pow281.6%
associate--l-81.6%
Applied egg-rr81.6%
Taylor expanded in z around inf 99.9%
Final simplification99.9%
(FPCore (x y z) :precision binary64 (if (or (<= (* x 0.5) -1e-289) (not (<= (* x 0.5) 3.5e-258))) (- (* x 0.5) (* y z)) (* y (+ 1.0 (log z)))))
double code(double x, double y, double z) {
double tmp;
if (((x * 0.5) <= -1e-289) || !((x * 0.5) <= 3.5e-258)) {
tmp = (x * 0.5) - (y * z);
} else {
tmp = y * (1.0 + log(z));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (((x * 0.5d0) <= (-1d-289)) .or. (.not. ((x * 0.5d0) <= 3.5d-258))) then
tmp = (x * 0.5d0) - (y * z)
else
tmp = y * (1.0d0 + log(z))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (((x * 0.5) <= -1e-289) || !((x * 0.5) <= 3.5e-258)) {
tmp = (x * 0.5) - (y * z);
} else {
tmp = y * (1.0 + Math.log(z));
}
return tmp;
}
def code(x, y, z): tmp = 0 if ((x * 0.5) <= -1e-289) or not ((x * 0.5) <= 3.5e-258): tmp = (x * 0.5) - (y * z) else: tmp = y * (1.0 + math.log(z)) return tmp
function code(x, y, z) tmp = 0.0 if ((Float64(x * 0.5) <= -1e-289) || !(Float64(x * 0.5) <= 3.5e-258)) tmp = Float64(Float64(x * 0.5) - Float64(y * z)); else tmp = Float64(y * Float64(1.0 + log(z))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (((x * 0.5) <= -1e-289) || ~(((x * 0.5) <= 3.5e-258))) tmp = (x * 0.5) - (y * z); else tmp = y * (1.0 + log(z)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[N[(x * 0.5), $MachinePrecision], -1e-289], N[Not[LessEqual[N[(x * 0.5), $MachinePrecision], 3.5e-258]], $MachinePrecision]], N[(N[(x * 0.5), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision], N[(y * N[(1.0 + N[Log[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot 0.5 \leq -1 \cdot 10^{-289} \lor \neg \left(x \cdot 0.5 \leq 3.5 \cdot 10^{-258}\right):\\
\;\;\;\;x \cdot 0.5 - y \cdot z\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(1 + \log z\right)\\
\end{array}
\end{array}
if (*.f64 x 1/2) < -1e-289 or 3.50000000000000001e-258 < (*.f64 x 1/2) Initial program 99.9%
Taylor expanded in z around inf 81.2%
mul-1-neg81.2%
*-commutative81.2%
distribute-rgt-neg-in81.2%
Simplified81.2%
fma-def81.2%
distribute-rgt-neg-out81.2%
add-sqr-sqrt44.9%
sqrt-unprod59.8%
sqr-neg59.8%
sqrt-unprod18.1%
add-sqr-sqrt44.0%
fma-neg44.0%
add-sqr-sqrt18.1%
sqrt-unprod59.8%
sqr-neg59.8%
sqrt-unprod44.9%
add-sqr-sqrt81.2%
*-commutative81.2%
Applied egg-rr81.2%
if -1e-289 < (*.f64 x 1/2) < 3.50000000000000001e-258Initial program 99.4%
Taylor expanded in z around inf 99.4%
Taylor expanded in x around 0 99.4%
Taylor expanded in z around 0 78.3%
Final simplification81.1%
(FPCore (x y z) :precision binary64 (+ (* x 0.5) (* y (- 1.0 (+ z (log (/ 1.0 z)))))))
double code(double x, double y, double z) {
return (x * 0.5) + (y * (1.0 - (z + log((1.0 / 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((1.0d0 / z)))))
end function
public static double code(double x, double y, double z) {
return (x * 0.5) + (y * (1.0 - (z + Math.log((1.0 / z)))));
}
def code(x, y, z): return (x * 0.5) + (y * (1.0 - (z + math.log((1.0 / z)))))
function code(x, y, z) return Float64(Float64(x * 0.5) + Float64(y * Float64(1.0 - Float64(z + log(Float64(1.0 / z)))))) end
function tmp = code(x, y, z) tmp = (x * 0.5) + (y * (1.0 - (z + log((1.0 / z))))); end
code[x_, y_, z_] := N[(N[(x * 0.5), $MachinePrecision] + N[(y * N[(1.0 - N[(z + N[Log[N[(1.0 / z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot 0.5 + y \cdot \left(1 - \left(z + \log \left(\frac{1}{z}\right)\right)\right)
\end{array}
Initial program 99.9%
Taylor expanded in z around inf 99.9%
Final simplification99.9%
(FPCore (x y z) :precision binary64 (if (or (<= y -6e+68) (not (<= y 1.35e+84))) (* y (+ (- 1.0 z) (log z))) (- (* x 0.5) (* y z))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -6e+68) || !(y <= 1.35e+84)) {
tmp = y * ((1.0 - z) + log(z));
} else {
tmp = (x * 0.5) - (y * z);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y <= (-6d+68)) .or. (.not. (y <= 1.35d+84))) then
tmp = y * ((1.0d0 - z) + log(z))
else
tmp = (x * 0.5d0) - (y * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -6e+68) || !(y <= 1.35e+84)) {
tmp = y * ((1.0 - z) + Math.log(z));
} else {
tmp = (x * 0.5) - (y * z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -6e+68) or not (y <= 1.35e+84): tmp = y * ((1.0 - z) + math.log(z)) else: tmp = (x * 0.5) - (y * z) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -6e+68) || !(y <= 1.35e+84)) tmp = Float64(y * Float64(Float64(1.0 - z) + log(z))); else tmp = Float64(Float64(x * 0.5) - Float64(y * z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -6e+68) || ~((y <= 1.35e+84))) tmp = y * ((1.0 - z) + log(z)); else tmp = (x * 0.5) - (y * z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -6e+68], N[Not[LessEqual[y, 1.35e+84]], $MachinePrecision]], N[(y * N[(N[(1.0 - z), $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 0.5), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6 \cdot 10^{+68} \lor \neg \left(y \leq 1.35 \cdot 10^{+84}\right):\\
\;\;\;\;y \cdot \left(\left(1 - z\right) + \log z\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 0.5 - y \cdot z\\
\end{array}
\end{array}
if y < -6.0000000000000004e68 or 1.35e84 < y Initial program 99.8%
Taylor expanded in z around inf 99.8%
Taylor expanded in x around 0 93.5%
Taylor expanded in z around 0 93.5%
+-commutative93.5%
distribute-lft-in93.4%
*-rgt-identity93.4%
associate-+l+93.4%
mul-1-neg93.4%
distribute-rgt-neg-in93.4%
mul-1-neg93.4%
distribute-lft-in93.4%
+-commutative93.4%
remove-double-neg93.4%
log-rec93.4%
mul-1-neg93.4%
*-rgt-identity93.4%
distribute-lft-in93.5%
+-commutative93.5%
+-commutative93.5%
associate-+r+93.5%
Simplified93.5%
if -6.0000000000000004e68 < y < 1.35e84Initial program 99.9%
Taylor expanded in z around inf 88.0%
mul-1-neg88.0%
*-commutative88.0%
distribute-rgt-neg-in88.0%
Simplified88.0%
fma-def88.0%
distribute-rgt-neg-out88.0%
add-sqr-sqrt50.9%
sqrt-unprod72.8%
sqr-neg72.8%
sqrt-unprod25.4%
add-sqr-sqrt60.5%
fma-neg60.5%
add-sqr-sqrt25.4%
sqrt-unprod72.8%
sqr-neg72.8%
sqrt-unprod50.9%
add-sqr-sqrt88.0%
*-commutative88.0%
Applied egg-rr88.0%
Final simplification89.8%
(FPCore (x y z) :precision binary64 (if (<= z 0.0002) (+ (* x 0.5) (* y (+ 1.0 (log z)))) (- (* x 0.5) (* y z))))
double code(double x, double y, double z) {
double tmp;
if (z <= 0.0002) {
tmp = (x * 0.5) + (y * (1.0 + log(z)));
} else {
tmp = (x * 0.5) - (y * z);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= 0.0002d0) then
tmp = (x * 0.5d0) + (y * (1.0d0 + log(z)))
else
tmp = (x * 0.5d0) - (y * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= 0.0002) {
tmp = (x * 0.5) + (y * (1.0 + Math.log(z)));
} else {
tmp = (x * 0.5) - (y * z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= 0.0002: tmp = (x * 0.5) + (y * (1.0 + math.log(z))) else: tmp = (x * 0.5) - (y * z) return tmp
function code(x, y, z) tmp = 0.0 if (z <= 0.0002) tmp = Float64(Float64(x * 0.5) + Float64(y * Float64(1.0 + log(z)))); else tmp = Float64(Float64(x * 0.5) - Float64(y * z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= 0.0002) tmp = (x * 0.5) + (y * (1.0 + log(z))); else tmp = (x * 0.5) - (y * z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, 0.0002], N[(N[(x * 0.5), $MachinePrecision] + N[(y * N[(1.0 + N[Log[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 0.5), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 0.0002:\\
\;\;\;\;x \cdot 0.5 + y \cdot \left(1 + \log z\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 0.5 - y \cdot z\\
\end{array}
\end{array}
if z < 2.0000000000000001e-4Initial program 99.8%
Taylor expanded in z around 0 99.2%
if 2.0000000000000001e-4 < z Initial program 100.0%
Taylor expanded in z around inf 98.8%
mul-1-neg98.8%
*-commutative98.8%
distribute-rgt-neg-in98.8%
Simplified98.8%
fma-def98.8%
distribute-rgt-neg-out98.8%
add-sqr-sqrt51.7%
sqrt-unprod60.9%
sqr-neg60.9%
sqrt-unprod13.7%
add-sqr-sqrt30.3%
fma-neg30.3%
add-sqr-sqrt13.7%
sqrt-unprod60.9%
sqr-neg60.9%
sqrt-unprod51.7%
add-sqr-sqrt98.8%
*-commutative98.8%
Applied egg-rr98.8%
Final simplification99.0%
(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)));
}
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)));
}
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 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]
\begin{array}{l}
\\
x \cdot 0.5 + y \cdot \left(\left(1 - z\right) + \log z\right)
\end{array}
Initial program 99.9%
Final simplification99.9%
(FPCore (x y z) :precision binary64 (- (* x 0.5) (* y z)))
double code(double x, double y, double z) {
return (x * 0.5) - (y * 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 * z)
end function
public static double code(double x, double y, double z) {
return (x * 0.5) - (y * z);
}
def code(x, y, z): return (x * 0.5) - (y * z)
function code(x, y, z) return Float64(Float64(x * 0.5) - Float64(y * z)) end
function tmp = code(x, y, z) tmp = (x * 0.5) - (y * z); end
code[x_, y_, z_] := N[(N[(x * 0.5), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot 0.5 - y \cdot z
\end{array}
Initial program 99.9%
Taylor expanded in z around inf 78.7%
mul-1-neg78.7%
*-commutative78.7%
distribute-rgt-neg-in78.7%
Simplified78.7%
fma-def78.7%
distribute-rgt-neg-out78.7%
add-sqr-sqrt43.5%
sqrt-unprod57.8%
sqr-neg57.8%
sqrt-unprod17.4%
add-sqr-sqrt42.2%
fma-neg42.2%
add-sqr-sqrt17.4%
sqrt-unprod57.8%
sqr-neg57.8%
sqrt-unprod43.5%
add-sqr-sqrt78.7%
*-commutative78.7%
Applied egg-rr78.7%
Final simplification78.7%
(FPCore (x y z) :precision binary64 (if (<= z 1.18e+67) (* x 0.5) (- (* y z))))
double code(double x, double y, double z) {
double tmp;
if (z <= 1.18e+67) {
tmp = x * 0.5;
} else {
tmp = -(y * z);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= 1.18d+67) then
tmp = x * 0.5d0
else
tmp = -(y * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= 1.18e+67) {
tmp = x * 0.5;
} else {
tmp = -(y * z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= 1.18e+67: tmp = x * 0.5 else: tmp = -(y * z) return tmp
function code(x, y, z) tmp = 0.0 if (z <= 1.18e+67) tmp = Float64(x * 0.5); else tmp = Float64(-Float64(y * z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= 1.18e+67) tmp = x * 0.5; else tmp = -(y * z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, 1.18e+67], N[(x * 0.5), $MachinePrecision], (-N[(y * z), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.18 \cdot 10^{+67}:\\
\;\;\;\;x \cdot 0.5\\
\mathbf{else}:\\
\;\;\;\;-y \cdot z\\
\end{array}
\end{array}
if z < 1.17999999999999998e67Initial program 99.8%
Taylor expanded in x around inf 57.6%
if 1.17999999999999998e67 < z Initial program 100.0%
Taylor expanded in z around inf 100.0%
Taylor expanded in x around 0 80.0%
Taylor expanded in z around inf 80.0%
mul-1-neg80.0%
distribute-rgt-neg-in80.0%
Simplified80.0%
Final simplification66.6%
(FPCore (x y z) :precision binary64 (* x 0.5))
double code(double x, double y, double z) {
return x * 0.5;
}
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
end function
public static double code(double x, double y, double z) {
return x * 0.5;
}
def code(x, y, z): return x * 0.5
function code(x, y, z) return Float64(x * 0.5) end
function tmp = code(x, y, z) tmp = x * 0.5; end
code[x_, y_, z_] := N[(x * 0.5), $MachinePrecision]
\begin{array}{l}
\\
x \cdot 0.5
\end{array}
Initial program 99.9%
Taylor expanded in x around inf 43.2%
Final simplification43.2%
(FPCore (x y z) :precision binary64 (- (+ y (* 0.5 x)) (* y (- z (log z)))))
double code(double x, double y, double z) {
return (y + (0.5 * x)) - (y * (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 = (y + (0.5d0 * x)) - (y * (z - log(z)))
end function
public static double code(double x, double y, double z) {
return (y + (0.5 * x)) - (y * (z - Math.log(z)));
}
def code(x, y, z): return (y + (0.5 * x)) - (y * (z - math.log(z)))
function code(x, y, z) return Float64(Float64(y + Float64(0.5 * x)) - Float64(y * Float64(z - log(z)))) end
function tmp = code(x, y, z) tmp = (y + (0.5 * x)) - (y * (z - log(z))); end
code[x_, y_, z_] := N[(N[(y + N[(0.5 * x), $MachinePrecision]), $MachinePrecision] - N[(y * N[(z - N[Log[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(y + 0.5 \cdot x\right) - y \cdot \left(z - \log z\right)
\end{array}
herbie shell --seed 2023311
(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)))))