
(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 9 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 y) (* (log y) y)) (* 0.5 (log y))) z))
double code(double x, double y, double z) {
return (((x + y) - (log(y) * y)) - (0.5 * log(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) - (log(y) * y)) - (0.5d0 * log(y))) - z
end function
public static double code(double x, double y, double z) {
return (((x + y) - (Math.log(y) * y)) - (0.5 * Math.log(y))) - z;
}
def code(x, y, z): return (((x + y) - (math.log(y) * y)) - (0.5 * math.log(y))) - z
function code(x, y, z) return Float64(Float64(Float64(Float64(x + y) - Float64(log(y) * y)) - Float64(0.5 * log(y))) - z) end
function tmp = code(x, y, z) tmp = (((x + y) - (log(y) * y)) - (0.5 * log(y))) - z; end
code[x_, y_, z_] := N[(N[(N[(N[(x + y), $MachinePrecision] - N[(N[Log[y], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] - N[(0.5 * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x + y\right) - \log y \cdot y\right) - 0.5 \cdot \log y\right) - z
\end{array}
Initial program 99.8%
lift-+.f64N/A
+-commutativeN/A
lift--.f64N/A
associate-+r-N/A
lift-*.f64N/A
*-commutativeN/A
lift-+.f64N/A
distribute-lft-inN/A
associate--r+N/A
lower--.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f6499.9
Applied rewrites99.9%
Final simplification99.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (- (+ (- x (* (+ 0.5 y) (log y))) y) z)))
(if (<= t_0 -5.0)
(* (- 1.0 (log y)) y)
(if (<= t_0 1e+50) (fma -0.5 (log y) y) (- z)))))
double code(double x, double y, double z) {
double t_0 = ((x - ((0.5 + y) * log(y))) + y) - z;
double tmp;
if (t_0 <= -5.0) {
tmp = (1.0 - log(y)) * y;
} else if (t_0 <= 1e+50) {
tmp = fma(-0.5, log(y), y);
} else {
tmp = -z;
}
return tmp;
}
function code(x, y, z) t_0 = Float64(Float64(Float64(x - Float64(Float64(0.5 + y) * log(y))) + y) - z) tmp = 0.0 if (t_0 <= -5.0) tmp = Float64(Float64(1.0 - log(y)) * y); elseif (t_0 <= 1e+50) tmp = fma(-0.5, log(y), y); else tmp = Float64(-z); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(x - N[(N[(0.5 + y), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] - z), $MachinePrecision]}, If[LessEqual[t$95$0, -5.0], N[(N[(1.0 - N[Log[y], $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t$95$0, 1e+50], N[(-0.5 * N[Log[y], $MachinePrecision] + y), $MachinePrecision], (-z)]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\left(x - \left(0.5 + y\right) \cdot \log y\right) + y\right) - z\\
\mathbf{if}\;t\_0 \leq -5:\\
\;\;\;\;\left(1 - \log y\right) \cdot y\\
\mathbf{elif}\;t\_0 \leq 10^{+50}:\\
\;\;\;\;\mathsf{fma}\left(-0.5, \log y, y\right)\\
\mathbf{else}:\\
\;\;\;\;-z\\
\end{array}
\end{array}
if (-.f64 (+.f64 (-.f64 x (*.f64 (+.f64 y #s(literal 1/2 binary64)) (log.f64 y))) y) z) < -5Initial program 99.8%
Taylor expanded in y around inf
*-commutativeN/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f6450.4
Applied rewrites50.4%
if -5 < (-.f64 (+.f64 (-.f64 x (*.f64 (+.f64 y #s(literal 1/2 binary64)) (log.f64 y))) y) z) < 1.0000000000000001e50Initial program 99.9%
Taylor expanded in x around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-+.f64N/A
lower-log.f6488.0
Applied rewrites88.0%
Taylor expanded in z around 0
Applied rewrites88.2%
Taylor expanded in y around 0
Applied rewrites87.3%
if 1.0000000000000001e50 < (-.f64 (+.f64 (-.f64 x (*.f64 (+.f64 y #s(literal 1/2 binary64)) (log.f64 y))) y) z) Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
lower-neg.f6448.8
Applied rewrites48.8%
Final simplification55.6%
(FPCore (x y z)
:precision binary64
(if (<= z -6.5e+49)
(- (* (- 1.0 (log y)) y) z)
(if (<= z 7.6e+21)
(fma (- -0.5 y) (log y) (+ x y))
(if (<= z 2.9e+109)
(- (fma -0.5 (log y) x) z)
(- y (fma (+ 0.5 y) (log y) z))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -6.5e+49) {
tmp = ((1.0 - log(y)) * y) - z;
} else if (z <= 7.6e+21) {
tmp = fma((-0.5 - y), log(y), (x + y));
} else if (z <= 2.9e+109) {
tmp = fma(-0.5, log(y), x) - z;
} else {
tmp = y - fma((0.5 + y), log(y), z);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (z <= -6.5e+49) tmp = Float64(Float64(Float64(1.0 - log(y)) * y) - z); elseif (z <= 7.6e+21) tmp = fma(Float64(-0.5 - y), log(y), Float64(x + y)); elseif (z <= 2.9e+109) tmp = Float64(fma(-0.5, log(y), x) - z); else tmp = Float64(y - fma(Float64(0.5 + y), log(y), z)); end return tmp end
code[x_, y_, z_] := If[LessEqual[z, -6.5e+49], N[(N[(N[(1.0 - N[Log[y], $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision] - z), $MachinePrecision], If[LessEqual[z, 7.6e+21], N[(N[(-0.5 - y), $MachinePrecision] * N[Log[y], $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.9e+109], N[(N[(-0.5 * N[Log[y], $MachinePrecision] + x), $MachinePrecision] - z), $MachinePrecision], N[(y - N[(N[(0.5 + y), $MachinePrecision] * N[Log[y], $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+49}:\\
\;\;\;\;\left(1 - \log y\right) \cdot y - z\\
\mathbf{elif}\;z \leq 7.6 \cdot 10^{+21}:\\
\;\;\;\;\mathsf{fma}\left(-0.5 - y, \log y, x + y\right)\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{+109}:\\
\;\;\;\;\mathsf{fma}\left(-0.5, \log y, x\right) - z\\
\mathbf{else}:\\
\;\;\;\;y - \mathsf{fma}\left(0.5 + y, \log y, z\right)\\
\end{array}
\end{array}
if z < -6.5000000000000005e49Initial program 99.9%
Taylor expanded in y around inf
*-commutativeN/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f6489.8
Applied rewrites89.8%
if -6.5000000000000005e49 < z < 7.6e21Initial program 99.8%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
lower-+.f6499.6
Applied rewrites99.6%
if 7.6e21 < z < 2.9e109Initial program 99.9%
Taylor expanded in y around 0
sub-negN/A
+-commutativeN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-fma.f64N/A
lower-log.f6485.8
Applied rewrites85.8%
if 2.9e109 < z Initial program 100.0%
Taylor expanded in x around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-+.f64N/A
lower-log.f6489.2
Applied rewrites89.2%
Final simplification94.9%
(FPCore (x y z) :precision binary64 (if (<= z -3.2e+45) (- z) (if (<= z 3400000000000.0) (* -0.5 (log y)) (- z))))
double code(double x, double y, double z) {
double tmp;
if (z <= -3.2e+45) {
tmp = -z;
} else if (z <= 3400000000000.0) {
tmp = -0.5 * log(y);
} else {
tmp = -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 <= (-3.2d+45)) then
tmp = -z
else if (z <= 3400000000000.0d0) then
tmp = (-0.5d0) * log(y)
else
tmp = -z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -3.2e+45) {
tmp = -z;
} else if (z <= 3400000000000.0) {
tmp = -0.5 * Math.log(y);
} else {
tmp = -z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -3.2e+45: tmp = -z elif z <= 3400000000000.0: tmp = -0.5 * math.log(y) else: tmp = -z return tmp
function code(x, y, z) tmp = 0.0 if (z <= -3.2e+45) tmp = Float64(-z); elseif (z <= 3400000000000.0) tmp = Float64(-0.5 * log(y)); else tmp = Float64(-z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -3.2e+45) tmp = -z; elseif (z <= 3400000000000.0) tmp = -0.5 * log(y); else tmp = -z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -3.2e+45], (-z), If[LessEqual[z, 3400000000000.0], N[(-0.5 * N[Log[y], $MachinePrecision]), $MachinePrecision], (-z)]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+45}:\\
\;\;\;\;-z\\
\mathbf{elif}\;z \leq 3400000000000:\\
\;\;\;\;-0.5 \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;-z\\
\end{array}
\end{array}
if z < -3.2000000000000003e45 or 3.4e12 < z Initial program 99.9%
Taylor expanded in z around inf
mul-1-negN/A
lower-neg.f6463.3
Applied rewrites63.3%
if -3.2000000000000003e45 < z < 3.4e12Initial program 99.8%
Taylor expanded in x around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-+.f64N/A
lower-log.f6458.9
Applied rewrites58.9%
Taylor expanded in z around 0
Applied rewrites58.9%
Taylor expanded in y around 0
Applied rewrites26.2%
(FPCore (x y z) :precision binary64 (if (<= y 8.2e+55) (- (fma -0.5 (log y) x) z) (- (* (- 1.0 (log y)) y) z)))
double code(double x, double y, double z) {
double tmp;
if (y <= 8.2e+55) {
tmp = fma(-0.5, log(y), x) - z;
} else {
tmp = ((1.0 - log(y)) * y) - z;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (y <= 8.2e+55) tmp = Float64(fma(-0.5, log(y), x) - z); else tmp = Float64(Float64(Float64(1.0 - log(y)) * y) - z); end return tmp end
code[x_, y_, z_] := If[LessEqual[y, 8.2e+55], N[(N[(-0.5 * N[Log[y], $MachinePrecision] + x), $MachinePrecision] - z), $MachinePrecision], N[(N[(N[(1.0 - N[Log[y], $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision] - z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 8.2 \cdot 10^{+55}:\\
\;\;\;\;\mathsf{fma}\left(-0.5, \log y, x\right) - z\\
\mathbf{else}:\\
\;\;\;\;\left(1 - \log y\right) \cdot y - z\\
\end{array}
\end{array}
if y < 8.19999999999999962e55Initial program 99.9%
Taylor expanded in y around 0
sub-negN/A
+-commutativeN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-fma.f64N/A
lower-log.f6495.6
Applied rewrites95.6%
if 8.19999999999999962e55 < y Initial program 99.7%
Taylor expanded in y around inf
*-commutativeN/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f6483.3
Applied rewrites83.3%
(FPCore (x y z) :precision binary64 (- (+ (- x (* (+ 0.5 y) (log y))) y) z))
double code(double x, double y, double z) {
return ((x - ((0.5 + y) * 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 - ((0.5d0 + y) * log(y))) + y) - z
end function
public static double code(double x, double y, double z) {
return ((x - ((0.5 + y) * Math.log(y))) + y) - z;
}
def code(x, y, z): return ((x - ((0.5 + y) * math.log(y))) + y) - z
function code(x, y, z) return Float64(Float64(Float64(x - Float64(Float64(0.5 + y) * log(y))) + y) - z) end
function tmp = code(x, y, z) tmp = ((x - ((0.5 + y) * log(y))) + y) - z; end
code[x_, y_, z_] := N[(N[(N[(x - N[(N[(0.5 + y), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] - z), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x - \left(0.5 + y\right) \cdot \log y\right) + y\right) - z
\end{array}
Initial program 99.8%
Final simplification99.8%
(FPCore (x y z) :precision binary64 (if (<= y 2.02e+93) (- (fma -0.5 (log y) x) z) (* (- 1.0 (log y)) y)))
double code(double x, double y, double z) {
double tmp;
if (y <= 2.02e+93) {
tmp = fma(-0.5, log(y), x) - z;
} else {
tmp = (1.0 - log(y)) * y;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (y <= 2.02e+93) tmp = Float64(fma(-0.5, log(y), x) - z); else tmp = Float64(Float64(1.0 - log(y)) * y); end return tmp end
code[x_, y_, z_] := If[LessEqual[y, 2.02e+93], N[(N[(-0.5 * N[Log[y], $MachinePrecision] + x), $MachinePrecision] - z), $MachinePrecision], N[(N[(1.0 - N[Log[y], $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.02 \cdot 10^{+93}:\\
\;\;\;\;\mathsf{fma}\left(-0.5, \log y, x\right) - z\\
\mathbf{else}:\\
\;\;\;\;\left(1 - \log y\right) \cdot y\\
\end{array}
\end{array}
if y < 2.01999999999999998e93Initial program 99.9%
Taylor expanded in y around 0
sub-negN/A
+-commutativeN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-fma.f64N/A
lower-log.f6491.6
Applied rewrites91.6%
if 2.01999999999999998e93 < y Initial program 99.7%
Taylor expanded in y around inf
*-commutativeN/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f6469.4
Applied rewrites69.4%
(FPCore (x y z) :precision binary64 (if (<= y 2.6e+20) (- (* -0.5 (log y)) z) (* (- 1.0 (log y)) y)))
double code(double x, double y, double z) {
double tmp;
if (y <= 2.6e+20) {
tmp = (-0.5 * log(y)) - z;
} else {
tmp = (1.0 - log(y)) * 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 <= 2.6d+20) then
tmp = ((-0.5d0) * log(y)) - z
else
tmp = (1.0d0 - log(y)) * y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= 2.6e+20) {
tmp = (-0.5 * Math.log(y)) - z;
} else {
tmp = (1.0 - Math.log(y)) * y;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= 2.6e+20: tmp = (-0.5 * math.log(y)) - z else: tmp = (1.0 - math.log(y)) * y return tmp
function code(x, y, z) tmp = 0.0 if (y <= 2.6e+20) tmp = Float64(Float64(-0.5 * log(y)) - z); else tmp = Float64(Float64(1.0 - log(y)) * y); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= 2.6e+20) tmp = (-0.5 * log(y)) - z; else tmp = (1.0 - log(y)) * y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, 2.6e+20], N[(N[(-0.5 * N[Log[y], $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision], N[(N[(1.0 - N[Log[y], $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.6 \cdot 10^{+20}:\\
\;\;\;\;-0.5 \cdot \log y - z\\
\mathbf{else}:\\
\;\;\;\;\left(1 - \log y\right) \cdot y\\
\end{array}
\end{array}
if y < 2.6e20Initial program 100.0%
Taylor expanded in y around 0
sub-negN/A
+-commutativeN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-fma.f64N/A
lower-log.f6498.5
Applied rewrites98.5%
Taylor expanded in x around 0
Applied rewrites59.6%
if 2.6e20 < y Initial program 99.7%
Taylor expanded in y around inf
*-commutativeN/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f6461.9
Applied rewrites61.9%
(FPCore (x y z) :precision binary64 (- z))
double code(double x, double y, double z) {
return -z;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = -z
end function
public static double code(double x, double y, double z) {
return -z;
}
def code(x, y, z): return -z
function code(x, y, z) return Float64(-z) end
function tmp = code(x, y, z) tmp = -z; end
code[x_, y_, z_] := (-z)
\begin{array}{l}
\\
-z
\end{array}
Initial program 99.8%
Taylor expanded in z around inf
mul-1-negN/A
lower-neg.f6429.0
Applied rewrites29.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 2024240
(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))