
(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 (- z (+ (log z) 1.0)))))
double code(double x, double y, double z) {
return (x * 0.5) - (y * (z - (log(z) + 1.0)));
}
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 - (log(z) + 1.0d0)))
end function
public static double code(double x, double y, double z) {
return (x * 0.5) - (y * (z - (Math.log(z) + 1.0)));
}
def code(x, y, z): return (x * 0.5) - (y * (z - (math.log(z) + 1.0)))
function code(x, y, z) return Float64(Float64(x * 0.5) - Float64(y * Float64(z - Float64(log(z) + 1.0)))) end
function tmp = code(x, y, z) tmp = (x * 0.5) - (y * (z - (log(z) + 1.0))); end
code[x_, y_, z_] := N[(N[(x * 0.5), $MachinePrecision] - N[(y * N[(z - N[(N[Log[z], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot 0.5 - y \cdot \left(z - \left(\log z + 1\right)\right)
\end{array}
Initial program 99.9%
Taylor expanded in y around 0 99.9%
Final simplification99.9%
(FPCore (x y z)
:precision binary64
(if (or (<= z 7e-269)
(and (not (<= z 1.45e-193))
(or (<= z 5.6e-165) (and (not (<= z 7.4e-113)) (<= z 2.5e-28)))))
(+ y (* y (log z)))
(- (* x 0.5) (* y z))))
double code(double x, double y, double z) {
double tmp;
if ((z <= 7e-269) || (!(z <= 1.45e-193) && ((z <= 5.6e-165) || (!(z <= 7.4e-113) && (z <= 2.5e-28))))) {
tmp = y + (y * 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 <= 7d-269) .or. (.not. (z <= 1.45d-193)) .and. (z <= 5.6d-165) .or. (.not. (z <= 7.4d-113)) .and. (z <= 2.5d-28)) then
tmp = y + (y * 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 <= 7e-269) || (!(z <= 1.45e-193) && ((z <= 5.6e-165) || (!(z <= 7.4e-113) && (z <= 2.5e-28))))) {
tmp = y + (y * Math.log(z));
} else {
tmp = (x * 0.5) - (y * z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= 7e-269) or (not (z <= 1.45e-193) and ((z <= 5.6e-165) or (not (z <= 7.4e-113) and (z <= 2.5e-28)))): tmp = y + (y * math.log(z)) else: tmp = (x * 0.5) - (y * z) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= 7e-269) || (!(z <= 1.45e-193) && ((z <= 5.6e-165) || (!(z <= 7.4e-113) && (z <= 2.5e-28))))) tmp = Float64(y + Float64(y * 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 <= 7e-269) || (~((z <= 1.45e-193)) && ((z <= 5.6e-165) || (~((z <= 7.4e-113)) && (z <= 2.5e-28))))) tmp = y + (y * log(z)); else tmp = (x * 0.5) - (y * z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, 7e-269], And[N[Not[LessEqual[z, 1.45e-193]], $MachinePrecision], Or[LessEqual[z, 5.6e-165], And[N[Not[LessEqual[z, 7.4e-113]], $MachinePrecision], LessEqual[z, 2.5e-28]]]]], N[(y + N[(y * 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}\;z \leq 7 \cdot 10^{-269} \lor \neg \left(z \leq 1.45 \cdot 10^{-193}\right) \land \left(z \leq 5.6 \cdot 10^{-165} \lor \neg \left(z \leq 7.4 \cdot 10^{-113}\right) \land z \leq 2.5 \cdot 10^{-28}\right):\\
\;\;\;\;y + y \cdot \log z\\
\mathbf{else}:\\
\;\;\;\;x \cdot 0.5 - y \cdot z\\
\end{array}
\end{array}
if z < 7.00000000000000038e-269 or 1.45000000000000003e-193 < z < 5.5999999999999999e-165 or 7.3999999999999996e-113 < z < 2.5000000000000001e-28Initial program 99.6%
sub-neg99.6%
associate-+l+99.6%
distribute-rgt-in99.7%
*-lft-identity99.7%
associate-+r+99.7%
neg-sub099.7%
associate-+l-99.7%
neg-sub099.7%
distribute-lft-neg-out99.7%
unsub-neg99.7%
fma-def99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 72.4%
Taylor expanded in z around 0 72.4%
neg-mul-172.4%
Simplified72.4%
if 7.00000000000000038e-269 < z < 1.45000000000000003e-193 or 5.5999999999999999e-165 < z < 7.3999999999999996e-113 or 2.5000000000000001e-28 < z Initial program 99.9%
Taylor expanded in z around inf 87.0%
associate-*r*87.0%
neg-mul-187.0%
Simplified87.0%
Final simplification83.4%
(FPCore (x y z) :precision binary64 (if (or (<= y -320000000.0) (not (<= y 1.5e+135))) (* y (- (+ (log z) 1.0) z)) (- (* x 0.5) (* y z))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -320000000.0) || !(y <= 1.5e+135)) {
tmp = y * ((log(z) + 1.0) - 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 <= (-320000000.0d0)) .or. (.not. (y <= 1.5d+135))) then
tmp = y * ((log(z) + 1.0d0) - 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 <= -320000000.0) || !(y <= 1.5e+135)) {
tmp = y * ((Math.log(z) + 1.0) - z);
} else {
tmp = (x * 0.5) - (y * z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -320000000.0) or not (y <= 1.5e+135): tmp = y * ((math.log(z) + 1.0) - z) else: tmp = (x * 0.5) - (y * z) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -320000000.0) || !(y <= 1.5e+135)) tmp = Float64(y * Float64(Float64(log(z) + 1.0) - 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 <= -320000000.0) || ~((y <= 1.5e+135))) tmp = y * ((log(z) + 1.0) - z); else tmp = (x * 0.5) - (y * z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -320000000.0], N[Not[LessEqual[y, 1.5e+135]], $MachinePrecision]], N[(y * N[(N[(N[Log[z], $MachinePrecision] + 1.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision], N[(N[(x * 0.5), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -320000000 \lor \neg \left(y \leq 1.5 \cdot 10^{+135}\right):\\
\;\;\;\;y \cdot \left(\left(\log z + 1\right) - z\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 0.5 - y \cdot z\\
\end{array}
\end{array}
if y < -3.2e8 or 1.5e135 < y Initial program 99.7%
Taylor expanded in y around 0 99.8%
Taylor expanded in x around 0 94.2%
if -3.2e8 < y < 1.5e135Initial program 99.9%
Taylor expanded in z around inf 85.3%
associate-*r*85.3%
neg-mul-185.3%
Simplified85.3%
Final simplification88.9%
(FPCore (x y z) :precision binary64 (if (<= y -1300.0) (* y (- (+ (log z) 1.0) z)) (if (<= y 1.5e+135) (- (* x 0.5) (* y z)) (+ y (* y (- (log z) z))))))
double code(double x, double y, double z) {
double tmp;
if (y <= -1300.0) {
tmp = y * ((log(z) + 1.0) - z);
} else if (y <= 1.5e+135) {
tmp = (x * 0.5) - (y * z);
} else {
tmp = y + (y * (log(z) - 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 <= (-1300.0d0)) then
tmp = y * ((log(z) + 1.0d0) - z)
else if (y <= 1.5d+135) then
tmp = (x * 0.5d0) - (y * z)
else
tmp = y + (y * (log(z) - z))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -1300.0) {
tmp = y * ((Math.log(z) + 1.0) - z);
} else if (y <= 1.5e+135) {
tmp = (x * 0.5) - (y * z);
} else {
tmp = y + (y * (Math.log(z) - z));
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -1300.0: tmp = y * ((math.log(z) + 1.0) - z) elif y <= 1.5e+135: tmp = (x * 0.5) - (y * z) else: tmp = y + (y * (math.log(z) - z)) return tmp
function code(x, y, z) tmp = 0.0 if (y <= -1300.0) tmp = Float64(y * Float64(Float64(log(z) + 1.0) - z)); elseif (y <= 1.5e+135) tmp = Float64(Float64(x * 0.5) - Float64(y * z)); else tmp = Float64(y + Float64(y * Float64(log(z) - z))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -1300.0) tmp = y * ((log(z) + 1.0) - z); elseif (y <= 1.5e+135) tmp = (x * 0.5) - (y * z); else tmp = y + (y * (log(z) - z)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -1300.0], N[(y * N[(N[(N[Log[z], $MachinePrecision] + 1.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e+135], N[(N[(x * 0.5), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision], N[(y + N[(y * N[(N[Log[z], $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1300:\\
\;\;\;\;y \cdot \left(\left(\log z + 1\right) - z\right)\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{+135}:\\
\;\;\;\;x \cdot 0.5 - y \cdot z\\
\mathbf{else}:\\
\;\;\;\;y + y \cdot \left(\log z - z\right)\\
\end{array}
\end{array}
if y < -1300Initial program 99.7%
Taylor expanded in y around 0 99.8%
Taylor expanded in x around 0 92.7%
if -1300 < y < 1.5e135Initial program 99.9%
Taylor expanded in z around inf 85.3%
associate-*r*85.3%
neg-mul-185.3%
Simplified85.3%
if 1.5e135 < y Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
distribute-rgt-in99.8%
*-lft-identity99.8%
associate-+r+99.8%
neg-sub099.8%
associate-+l-99.8%
neg-sub099.8%
distribute-lft-neg-out99.8%
unsub-neg99.8%
fma-def99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around 0 97.1%
Final simplification88.9%
(FPCore (x y z) :precision binary64 (if (<= z 0.28) (+ (* x 0.5) (* y (+ (log z) 1.0))) (- (* x 0.5) (* y z))))
double code(double x, double y, double z) {
double tmp;
if (z <= 0.28) {
tmp = (x * 0.5) + (y * (log(z) + 1.0));
} 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.28d0) then
tmp = (x * 0.5d0) + (y * (log(z) + 1.0d0))
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.28) {
tmp = (x * 0.5) + (y * (Math.log(z) + 1.0));
} else {
tmp = (x * 0.5) - (y * z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= 0.28: tmp = (x * 0.5) + (y * (math.log(z) + 1.0)) else: tmp = (x * 0.5) - (y * z) return tmp
function code(x, y, z) tmp = 0.0 if (z <= 0.28) tmp = Float64(Float64(x * 0.5) + Float64(y * Float64(log(z) + 1.0))); 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.28) tmp = (x * 0.5) + (y * (log(z) + 1.0)); else tmp = (x * 0.5) - (y * z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, 0.28], N[(N[(x * 0.5), $MachinePrecision] + N[(y * N[(N[Log[z], $MachinePrecision] + 1.0), $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.28:\\
\;\;\;\;x \cdot 0.5 + y \cdot \left(\log z + 1\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 0.5 - y \cdot z\\
\end{array}
\end{array}
if z < 0.28000000000000003Initial program 99.7%
Taylor expanded in z around 0 97.8%
if 0.28000000000000003 < z Initial program 100.0%
Taylor expanded in z around inf 99.1%
associate-*r*99.1%
neg-mul-199.1%
Simplified99.1%
Final simplification98.4%
(FPCore (x y z) :precision binary64 (- (* x 0.5) (* y (- (+ z -1.0) (log z)))))
double code(double x, double y, double z) {
return (x * 0.5) - (y * ((z + -1.0) - 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 * ((z + (-1.0d0)) - log(z)))
end function
public static double code(double x, double y, double z) {
return (x * 0.5) - (y * ((z + -1.0) - Math.log(z)));
}
def code(x, y, z): return (x * 0.5) - (y * ((z + -1.0) - math.log(z)))
function code(x, y, z) return Float64(Float64(x * 0.5) - Float64(y * Float64(Float64(z + -1.0) - log(z)))) end
function tmp = code(x, y, z) tmp = (x * 0.5) - (y * ((z + -1.0) - log(z))); end
code[x_, y_, z_] := N[(N[(x * 0.5), $MachinePrecision] - N[(y * N[(N[(z + -1.0), $MachinePrecision] - N[Log[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot 0.5 - y \cdot \left(\left(z + -1\right) - \log z\right)
\end{array}
Initial program 99.9%
Final simplification99.9%
(FPCore (x y z) :precision binary64 (if (<= z 7e+32) (* x 0.5) (- y (* y z))))
double code(double x, double y, double z) {
double tmp;
if (z <= 7e+32) {
tmp = x * 0.5;
} else {
tmp = y - (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 <= 7d+32) then
tmp = x * 0.5d0
else
tmp = y - (y * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= 7e+32) {
tmp = x * 0.5;
} else {
tmp = y - (y * z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= 7e+32: tmp = x * 0.5 else: tmp = y - (y * z) return tmp
function code(x, y, z) tmp = 0.0 if (z <= 7e+32) tmp = Float64(x * 0.5); else tmp = Float64(y - Float64(y * z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= 7e+32) tmp = x * 0.5; else tmp = y - (y * z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, 7e+32], N[(x * 0.5), $MachinePrecision], N[(y - N[(y * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 7 \cdot 10^{+32}:\\
\;\;\;\;x \cdot 0.5\\
\mathbf{else}:\\
\;\;\;\;y - y \cdot z\\
\end{array}
\end{array}
if z < 7.0000000000000002e32Initial program 99.7%
Taylor expanded in x around inf 46.0%
if 7.0000000000000002e32 < z Initial program 100.0%
sub-neg100.0%
associate-+l+100.0%
distribute-rgt-in100.0%
*-lft-identity100.0%
associate-+r+100.0%
neg-sub0100.0%
associate-+l-100.0%
neg-sub0100.0%
distribute-lft-neg-out100.0%
unsub-neg100.0%
fma-def100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in x around 0 75.6%
Taylor expanded in z around inf 75.6%
*-commutative75.6%
Simplified75.6%
Final simplification59.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 73.0%
associate-*r*73.0%
neg-mul-173.0%
Simplified73.0%
Final simplification73.0%
(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 36.9%
Final simplification36.9%
(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 2023279
(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)))))