
(FPCore (x y z) :precision binary64 (- (+ (- x (* (+ y 0.5) (log y))) y) z))
double code(double x, double y, double z) {
return ((x - ((y + 0.5) * log(y))) + 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 - ((y + 0.5d0) * log(y))) + y) - z
end function
public static double code(double x, double y, double z) {
return ((x - ((y + 0.5) * Math.log(y))) + y) - z;
}
def code(x, y, z): return ((x - ((y + 0.5) * math.log(y))) + y) - z
function code(x, y, z) return Float64(Float64(Float64(x - Float64(Float64(y + 0.5) * log(y))) + y) - z) end
function tmp = code(x, y, z) tmp = ((x - ((y + 0.5) * log(y))) + y) - z; end
code[x_, y_, z_] := N[(N[(N[(x - N[(N[(y + 0.5), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] - z), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (- (+ (- x (* (+ y 0.5) (log y))) y) z))
double code(double x, double y, double z) {
return ((x - ((y + 0.5) * log(y))) + 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 - ((y + 0.5d0) * log(y))) + y) - z
end function
public static double code(double x, double y, double z) {
return ((x - ((y + 0.5) * Math.log(y))) + y) - z;
}
def code(x, y, z): return ((x - ((y + 0.5) * math.log(y))) + y) - z
function code(x, y, z) return Float64(Float64(Float64(x - Float64(Float64(y + 0.5) * log(y))) + y) - z) end
function tmp = code(x, y, z) tmp = ((x - ((y + 0.5) * log(y))) + y) - z; end
code[x_, y_, z_] := N[(N[(N[(x - N[(N[(y + 0.5), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] - z), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
\end{array}
(FPCore (x y z) :precision binary64 (- (+ x (fma (log y) (- -0.5 y) y)) z))
double code(double x, double y, double z) {
return (x + fma(log(y), (-0.5 - y), y)) - z;
}
function code(x, y, z) return Float64(Float64(x + fma(log(y), Float64(-0.5 - y), y)) - z) end
code[x_, y_, z_] := N[(N[(x + N[(N[Log[y], $MachinePrecision] * N[(-0.5 - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]
\begin{array}{l}
\\
\left(x + \mathsf{fma}\left(\log y, -0.5 - y, y\right)\right) - z
\end{array}
Initial program 99.9%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
--lowering--.f64N/A
metadata-eval99.9
Applied egg-rr99.9%
(FPCore (x y z)
:precision binary64
(if (<= x -9e+29)
(- x z)
(if (<= x 1.8e+16)
(- y (fma (log y) (+ y 0.5) z))
(+ y (fma (log y) (- -0.5 y) x)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -9e+29) {
tmp = x - z;
} else if (x <= 1.8e+16) {
tmp = y - fma(log(y), (y + 0.5), z);
} else {
tmp = y + fma(log(y), (-0.5 - y), x);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= -9e+29) tmp = Float64(x - z); elseif (x <= 1.8e+16) tmp = Float64(y - fma(log(y), Float64(y + 0.5), z)); else tmp = Float64(y + fma(log(y), Float64(-0.5 - y), x)); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, -9e+29], N[(x - z), $MachinePrecision], If[LessEqual[x, 1.8e+16], N[(y - N[(N[Log[y], $MachinePrecision] * N[(y + 0.5), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision], N[(y + N[(N[Log[y], $MachinePrecision] * N[(-0.5 - y), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9 \cdot 10^{+29}:\\
\;\;\;\;x - z\\
\mathbf{elif}\;x \leq 1.8 \cdot 10^{+16}:\\
\;\;\;\;y - \mathsf{fma}\left(\log y, y + 0.5, z\right)\\
\mathbf{else}:\\
\;\;\;\;y + \mathsf{fma}\left(\log y, -0.5 - y, x\right)\\
\end{array}
\end{array}
if x < -9.0000000000000005e29Initial program 99.9%
Taylor expanded in x around inf
Simplified87.1%
if -9.0000000000000005e29 < x < 1.8e16Initial program 99.8%
Taylor expanded in x around 0
--lowering--.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f6498.6
Simplified98.6%
if 1.8e16 < x Initial program 99.9%
Taylor expanded in z around 0
+-commutativeN/A
associate--l+N/A
+-lowering-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
--lowering--.f6489.9
Simplified89.9%
(FPCore (x y z) :precision binary64 (if (<= z -1.25e+89) (- x z) (if (<= z 1.9e+97) (+ y (fma (log y) (- -0.5 y) x)) (- x z))))
double code(double x, double y, double z) {
double tmp;
if (z <= -1.25e+89) {
tmp = x - z;
} else if (z <= 1.9e+97) {
tmp = y + fma(log(y), (-0.5 - y), x);
} else {
tmp = x - z;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (z <= -1.25e+89) tmp = Float64(x - z); elseif (z <= 1.9e+97) tmp = Float64(y + fma(log(y), Float64(-0.5 - y), x)); else tmp = Float64(x - z); end return tmp end
code[x_, y_, z_] := If[LessEqual[z, -1.25e+89], N[(x - z), $MachinePrecision], If[LessEqual[z, 1.9e+97], N[(y + N[(N[Log[y], $MachinePrecision] * N[(-0.5 - y), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], N[(x - z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{+89}:\\
\;\;\;\;x - z\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+97}:\\
\;\;\;\;y + \mathsf{fma}\left(\log y, -0.5 - y, x\right)\\
\mathbf{else}:\\
\;\;\;\;x - z\\
\end{array}
\end{array}
if z < -1.24999999999999996e89 or 1.90000000000000018e97 < z Initial program 99.9%
Taylor expanded in x around inf
Simplified89.8%
if -1.24999999999999996e89 < z < 1.90000000000000018e97Initial program 99.8%
Taylor expanded in z around 0
+-commutativeN/A
associate--l+N/A
+-lowering-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
--lowering--.f6494.4
Simplified94.4%
(FPCore (x y z) :precision binary64 (if (<= z -1620.0) (- x z) (if (<= z 1.45e-5) (fma (log y) -0.5 x) (- x z))))
double code(double x, double y, double z) {
double tmp;
if (z <= -1620.0) {
tmp = x - z;
} else if (z <= 1.45e-5) {
tmp = fma(log(y), -0.5, x);
} else {
tmp = x - z;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (z <= -1620.0) tmp = Float64(x - z); elseif (z <= 1.45e-5) tmp = fma(log(y), -0.5, x); else tmp = Float64(x - z); end return tmp end
code[x_, y_, z_] := If[LessEqual[z, -1620.0], N[(x - z), $MachinePrecision], If[LessEqual[z, 1.45e-5], N[(N[Log[y], $MachinePrecision] * -0.5 + x), $MachinePrecision], N[(x - z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1620:\\
\;\;\;\;x - z\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{-5}:\\
\;\;\;\;\mathsf{fma}\left(\log y, -0.5, x\right)\\
\mathbf{else}:\\
\;\;\;\;x - z\\
\end{array}
\end{array}
if z < -1620 or 1.45e-5 < z Initial program 99.9%
Taylor expanded in x around inf
Simplified80.3%
if -1620 < z < 1.45e-5Initial program 99.8%
Taylor expanded in z around 0
+-commutativeN/A
associate--l+N/A
+-lowering-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
--lowering--.f6499.4
Simplified99.4%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f6467.0
Simplified67.0%
(FPCore (x y z) :precision binary64 (if (<= y 6.2e+50) (- (fma (log y) -0.5 x) z) (- (* y (- 1.0 (log y))) z)))
double code(double x, double y, double z) {
double tmp;
if (y <= 6.2e+50) {
tmp = fma(log(y), -0.5, x) - z;
} else {
tmp = (y * (1.0 - log(y))) - z;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (y <= 6.2e+50) tmp = Float64(fma(log(y), -0.5, x) - z); else tmp = Float64(Float64(y * Float64(1.0 - log(y))) - z); end return tmp end
code[x_, y_, z_] := If[LessEqual[y, 6.2e+50], N[(N[(N[Log[y], $MachinePrecision] * -0.5 + x), $MachinePrecision] - z), $MachinePrecision], N[(N[(y * N[(1.0 - N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 6.2 \cdot 10^{+50}:\\
\;\;\;\;\mathsf{fma}\left(\log y, -0.5, x\right) - z\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(1 - \log y\right) - z\\
\end{array}
\end{array}
if y < 6.20000000000000006e50Initial program 100.0%
Taylor expanded in y around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f6496.6
Simplified96.6%
if 6.20000000000000006e50 < y Initial program 99.7%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
--lowering--.f64N/A
metadata-eval99.7
Applied egg-rr99.7%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-recN/A
unsub-negN/A
--lowering--.f64N/A
log-lowering-log.f6482.1
Simplified82.1%
(FPCore (x y z) :precision binary64 (if (<= y 1.02e+148) (- (fma (log y) -0.5 x) z) (fma (log y) (- -0.5 y) y)))
double code(double x, double y, double z) {
double tmp;
if (y <= 1.02e+148) {
tmp = fma(log(y), -0.5, x) - z;
} else {
tmp = fma(log(y), (-0.5 - y), y);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (y <= 1.02e+148) tmp = Float64(fma(log(y), -0.5, x) - z); else tmp = fma(log(y), Float64(-0.5 - y), y); end return tmp end
code[x_, y_, z_] := If[LessEqual[y, 1.02e+148], N[(N[(N[Log[y], $MachinePrecision] * -0.5 + x), $MachinePrecision] - z), $MachinePrecision], N[(N[Log[y], $MachinePrecision] * N[(-0.5 - y), $MachinePrecision] + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.02 \cdot 10^{+148}:\\
\;\;\;\;\mathsf{fma}\left(\log y, -0.5, x\right) - z\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\log y, -0.5 - y, y\right)\\
\end{array}
\end{array}
if y < 1.02e148Initial program 99.9%
Taylor expanded in y around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f6489.0
Simplified89.0%
if 1.02e148 < y Initial program 99.6%
Taylor expanded in z around 0
+-commutativeN/A
associate--l+N/A
+-lowering-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
--lowering--.f6485.7
Simplified85.7%
Taylor expanded in x around 0
+-commutativeN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
--lowering--.f6474.8
Simplified74.8%
(FPCore (x y z) :precision binary64 (if (<= y 1.5e+148) (- (fma (log y) -0.5 x) z) (* y (- 1.0 (log y)))))
double code(double x, double y, double z) {
double tmp;
if (y <= 1.5e+148) {
tmp = fma(log(y), -0.5, x) - z;
} else {
tmp = y * (1.0 - log(y));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (y <= 1.5e+148) tmp = Float64(fma(log(y), -0.5, x) - z); else tmp = Float64(y * Float64(1.0 - log(y))); end return tmp end
code[x_, y_, z_] := If[LessEqual[y, 1.5e+148], N[(N[(N[Log[y], $MachinePrecision] * -0.5 + x), $MachinePrecision] - z), $MachinePrecision], N[(y * N[(1.0 - N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.5 \cdot 10^{+148}:\\
\;\;\;\;\mathsf{fma}\left(\log y, -0.5, x\right) - z\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(1 - \log y\right)\\
\end{array}
\end{array}
if y < 1.50000000000000007e148Initial program 99.9%
Taylor expanded in y around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f6489.0
Simplified89.0%
if 1.50000000000000007e148 < y Initial program 99.6%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
--lowering--.f64N/A
metadata-eval99.6
Applied egg-rr99.6%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-recN/A
unsub-negN/A
--lowering--.f64N/A
log-lowering-log.f6474.8
Simplified74.8%
(FPCore (x y z) :precision binary64 (if (<= y 1.22e+148) (- x z) (* y (- 1.0 (log y)))))
double code(double x, double y, double z) {
double tmp;
if (y <= 1.22e+148) {
tmp = x - z;
} else {
tmp = y * (1.0 - log(y));
}
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 <= 1.22d+148) then
tmp = x - z
else
tmp = y * (1.0d0 - log(y))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= 1.22e+148) {
tmp = x - z;
} else {
tmp = y * (1.0 - Math.log(y));
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= 1.22e+148: tmp = x - z else: tmp = y * (1.0 - math.log(y)) return tmp
function code(x, y, z) tmp = 0.0 if (y <= 1.22e+148) tmp = Float64(x - z); else tmp = Float64(y * Float64(1.0 - log(y))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= 1.22e+148) tmp = x - z; else tmp = y * (1.0 - log(y)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, 1.22e+148], N[(x - z), $MachinePrecision], N[(y * N[(1.0 - N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.22 \cdot 10^{+148}:\\
\;\;\;\;x - z\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(1 - \log y\right)\\
\end{array}
\end{array}
if y < 1.22000000000000007e148Initial program 99.9%
Taylor expanded in x around inf
Simplified71.6%
if 1.22000000000000007e148 < y Initial program 99.6%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
--lowering--.f64N/A
metadata-eval99.6
Applied egg-rr99.6%
Taylor expanded in y around inf
*-lowering-*.f64N/A
log-recN/A
unsub-negN/A
--lowering--.f64N/A
log-lowering-log.f6474.8
Simplified74.8%
(FPCore (x y z) :precision binary64 (if (<= z -5.6e+71) (- 0.0 z) (if (<= z 1.05e+101) x (- 0.0 z))))
double code(double x, double y, double z) {
double tmp;
if (z <= -5.6e+71) {
tmp = 0.0 - z;
} else if (z <= 1.05e+101) {
tmp = x;
} else {
tmp = 0.0 - 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 <= (-5.6d+71)) then
tmp = 0.0d0 - z
else if (z <= 1.05d+101) then
tmp = x
else
tmp = 0.0d0 - z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -5.6e+71) {
tmp = 0.0 - z;
} else if (z <= 1.05e+101) {
tmp = x;
} else {
tmp = 0.0 - z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -5.6e+71: tmp = 0.0 - z elif z <= 1.05e+101: tmp = x else: tmp = 0.0 - z return tmp
function code(x, y, z) tmp = 0.0 if (z <= -5.6e+71) tmp = Float64(0.0 - z); elseif (z <= 1.05e+101) tmp = x; else tmp = Float64(0.0 - z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -5.6e+71) tmp = 0.0 - z; elseif (z <= 1.05e+101) tmp = x; else tmp = 0.0 - z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -5.6e+71], N[(0.0 - z), $MachinePrecision], If[LessEqual[z, 1.05e+101], x, N[(0.0 - z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.6 \cdot 10^{+71}:\\
\;\;\;\;0 - z\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{+101}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;0 - z\\
\end{array}
\end{array}
if z < -5.60000000000000004e71 or 1.05e101 < z Initial program 99.9%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6473.1
Simplified73.1%
if -5.60000000000000004e71 < z < 1.05e101Initial program 99.8%
Taylor expanded in x around inf
Simplified44.6%
(FPCore (x y z) :precision binary64 (- x z))
double code(double x, double y, double z) {
return x - 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 - z
end function
public static double code(double x, double y, double z) {
return x - z;
}
def code(x, y, z): return x - z
function code(x, y, z) return Float64(x - z) end
function tmp = code(x, y, z) tmp = x - z; end
code[x_, y_, z_] := N[(x - z), $MachinePrecision]
\begin{array}{l}
\\
x - z
\end{array}
Initial program 99.9%
Taylor expanded in x around inf
Simplified60.5%
(FPCore (x y z) :precision binary64 x)
double code(double x, double y, double z) {
return x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x
end function
public static double code(double x, double y, double z) {
return x;
}
def code(x, y, z): return x
function code(x, y, z) return x end
function tmp = code(x, y, z) tmp = x; end
code[x_, y_, z_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 99.9%
Taylor expanded in x around inf
Simplified35.0%
(FPCore (x y z) :precision binary64 (- (- (+ y x) z) (* (+ y 0.5) (log y))))
double code(double x, double y, double z) {
return ((y + x) - z) - ((y + 0.5) * log(y));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((y + x) - z) - ((y + 0.5d0) * log(y))
end function
public static double code(double x, double y, double z) {
return ((y + x) - z) - ((y + 0.5) * Math.log(y));
}
def code(x, y, z): return ((y + x) - z) - ((y + 0.5) * math.log(y))
function code(x, y, z) return Float64(Float64(Float64(y + x) - z) - Float64(Float64(y + 0.5) * log(y))) end
function tmp = code(x, y, z) tmp = ((y + x) - z) - ((y + 0.5) * log(y)); end
code[x_, y_, z_] := N[(N[(N[(y + x), $MachinePrecision] - z), $MachinePrecision] - N[(N[(y + 0.5), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(y + x\right) - z\right) - \left(y + 0.5\right) \cdot \log y
\end{array}
herbie shell --seed 2024195
(FPCore (x y z)
:name "Numeric.SpecFunctions:stirlingError from math-functions-0.1.5.2"
:precision binary64
:alt
(! :herbie-platform default (- (- (+ y x) z) (* (+ y 1/2) (log y))))
(- (+ (- x (* (+ y 0.5) (log y))) y) z))