
(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 12 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(x + Float64(fma(log(y), Float64(-0.5 - y), y) - z)) end
code[x_, y_, z_] := N[(x + N[(N[(N[Log[y], $MachinePrecision] * N[(-0.5 - y), $MachinePrecision] + y), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\mathsf{fma}\left(\log y, -0.5 - y, y\right) - z\right)
\end{array}
Initial program 99.8%
associate--l+99.8%
sub-neg99.8%
associate-+l+99.8%
associate-+r-99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
fma-define99.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ x (- y z))))
(if (<= y 1.45e-154)
(- x (* (log y) 0.5))
(if (<= y 6e-46)
t_0
(if (<= y 6.5e-20)
(- (* (log y) -0.5) z)
(if (<= y 3.8e+22)
t_0
(if (or (<= y 1.1e+41) (not (<= y 2.35e+65)))
(- (+ x y) (* y (log y)))
(- x z))))))))
double code(double x, double y, double z) {
double t_0 = x + (y - z);
double tmp;
if (y <= 1.45e-154) {
tmp = x - (log(y) * 0.5);
} else if (y <= 6e-46) {
tmp = t_0;
} else if (y <= 6.5e-20) {
tmp = (log(y) * -0.5) - z;
} else if (y <= 3.8e+22) {
tmp = t_0;
} else if ((y <= 1.1e+41) || !(y <= 2.35e+65)) {
tmp = (x + y) - (y * log(y));
} else {
tmp = x - 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) :: t_0
real(8) :: tmp
t_0 = x + (y - z)
if (y <= 1.45d-154) then
tmp = x - (log(y) * 0.5d0)
else if (y <= 6d-46) then
tmp = t_0
else if (y <= 6.5d-20) then
tmp = (log(y) * (-0.5d0)) - z
else if (y <= 3.8d+22) then
tmp = t_0
else if ((y <= 1.1d+41) .or. (.not. (y <= 2.35d+65))) then
tmp = (x + y) - (y * log(y))
else
tmp = x - z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x + (y - z);
double tmp;
if (y <= 1.45e-154) {
tmp = x - (Math.log(y) * 0.5);
} else if (y <= 6e-46) {
tmp = t_0;
} else if (y <= 6.5e-20) {
tmp = (Math.log(y) * -0.5) - z;
} else if (y <= 3.8e+22) {
tmp = t_0;
} else if ((y <= 1.1e+41) || !(y <= 2.35e+65)) {
tmp = (x + y) - (y * Math.log(y));
} else {
tmp = x - z;
}
return tmp;
}
def code(x, y, z): t_0 = x + (y - z) tmp = 0 if y <= 1.45e-154: tmp = x - (math.log(y) * 0.5) elif y <= 6e-46: tmp = t_0 elif y <= 6.5e-20: tmp = (math.log(y) * -0.5) - z elif y <= 3.8e+22: tmp = t_0 elif (y <= 1.1e+41) or not (y <= 2.35e+65): tmp = (x + y) - (y * math.log(y)) else: tmp = x - z return tmp
function code(x, y, z) t_0 = Float64(x + Float64(y - z)) tmp = 0.0 if (y <= 1.45e-154) tmp = Float64(x - Float64(log(y) * 0.5)); elseif (y <= 6e-46) tmp = t_0; elseif (y <= 6.5e-20) tmp = Float64(Float64(log(y) * -0.5) - z); elseif (y <= 3.8e+22) tmp = t_0; elseif ((y <= 1.1e+41) || !(y <= 2.35e+65)) tmp = Float64(Float64(x + y) - Float64(y * log(y))); else tmp = Float64(x - z); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x + (y - z); tmp = 0.0; if (y <= 1.45e-154) tmp = x - (log(y) * 0.5); elseif (y <= 6e-46) tmp = t_0; elseif (y <= 6.5e-20) tmp = (log(y) * -0.5) - z; elseif (y <= 3.8e+22) tmp = t_0; elseif ((y <= 1.1e+41) || ~((y <= 2.35e+65))) tmp = (x + y) - (y * log(y)); else tmp = x - z; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x + N[(y - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 1.45e-154], N[(x - N[(N[Log[y], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6e-46], t$95$0, If[LessEqual[y, 6.5e-20], N[(N[(N[Log[y], $MachinePrecision] * -0.5), $MachinePrecision] - z), $MachinePrecision], If[LessEqual[y, 3.8e+22], t$95$0, If[Or[LessEqual[y, 1.1e+41], N[Not[LessEqual[y, 2.35e+65]], $MachinePrecision]], N[(N[(x + y), $MachinePrecision] - N[(y * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - z), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + \left(y - z\right)\\
\mathbf{if}\;y \leq 1.45 \cdot 10^{-154}:\\
\;\;\;\;x - \log y \cdot 0.5\\
\mathbf{elif}\;y \leq 6 \cdot 10^{-46}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{-20}:\\
\;\;\;\;\log y \cdot -0.5 - z\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+22}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{+41} \lor \neg \left(y \leq 2.35 \cdot 10^{+65}\right):\\
\;\;\;\;\left(x + y\right) - y \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;x - z\\
\end{array}
\end{array}
if y < 1.45e-154Initial program 100.0%
associate--l+100.0%
Simplified100.0%
Taylor expanded in z around 0 72.8%
Taylor expanded in y around 0 72.8%
if 1.45e-154 < y < 5.99999999999999975e-46 or 6.50000000000000032e-20 < y < 3.8000000000000004e22Initial program 100.0%
associate--l+100.0%
Simplified100.0%
Taylor expanded in x around 0 100.0%
+-commutative100.0%
distribute-rgt-in100.0%
distribute-lft-in100.0%
neg-mul-1100.0%
distribute-lft-neg-in100.0%
metadata-eval100.0%
associate-*r*100.0%
distribute-rgt-in100.0%
neg-mul-1100.0%
sub-neg100.0%
*-rgt-identity100.0%
fma-define100.0%
*-rgt-identity100.0%
Simplified100.0%
Taylor expanded in x around inf 81.9%
if 5.99999999999999975e-46 < y < 6.50000000000000032e-20Initial program 100.0%
associate--l+100.0%
sub-neg100.0%
associate-+l+100.0%
associate-+r-100.0%
*-commutative100.0%
distribute-rgt-neg-in100.0%
fma-define100.0%
+-commutative100.0%
distribute-neg-in100.0%
unsub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around 0 100.0%
Taylor expanded in x around 0 100.0%
if 3.8000000000000004e22 < y < 1.09999999999999995e41 or 2.3500000000000001e65 < y Initial program 99.7%
associate--l+99.7%
Simplified99.7%
Taylor expanded in z around 0 87.6%
Taylor expanded in y around inf 87.6%
mul-1-neg87.6%
distribute-rgt-neg-in87.6%
log-rec87.6%
remove-double-neg87.6%
Simplified87.6%
if 1.09999999999999995e41 < y < 2.3500000000000001e65Initial program 99.8%
associate--l+99.8%
sub-neg99.8%
associate-+l+99.8%
associate-+r-99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
fma-define99.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 83.7%
Taylor expanded in x around inf 83.1%
Final simplification83.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (- y (* (log y) (+ y 0.5)))))
(if (<= x -2.5e+36)
(- x z)
(if (<= x 1.6e-280)
t_0
(if (<= x 2.9e-139)
(- (* (log y) -0.5) z)
(if (<= x 6.2e+26) t_0 (- x z)))))))
double code(double x, double y, double z) {
double t_0 = y - (log(y) * (y + 0.5));
double tmp;
if (x <= -2.5e+36) {
tmp = x - z;
} else if (x <= 1.6e-280) {
tmp = t_0;
} else if (x <= 2.9e-139) {
tmp = (log(y) * -0.5) - z;
} else if (x <= 6.2e+26) {
tmp = t_0;
} else {
tmp = x - 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) :: t_0
real(8) :: tmp
t_0 = y - (log(y) * (y + 0.5d0))
if (x <= (-2.5d+36)) then
tmp = x - z
else if (x <= 1.6d-280) then
tmp = t_0
else if (x <= 2.9d-139) then
tmp = (log(y) * (-0.5d0)) - z
else if (x <= 6.2d+26) then
tmp = t_0
else
tmp = x - z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = y - (Math.log(y) * (y + 0.5));
double tmp;
if (x <= -2.5e+36) {
tmp = x - z;
} else if (x <= 1.6e-280) {
tmp = t_0;
} else if (x <= 2.9e-139) {
tmp = (Math.log(y) * -0.5) - z;
} else if (x <= 6.2e+26) {
tmp = t_0;
} else {
tmp = x - z;
}
return tmp;
}
def code(x, y, z): t_0 = y - (math.log(y) * (y + 0.5)) tmp = 0 if x <= -2.5e+36: tmp = x - z elif x <= 1.6e-280: tmp = t_0 elif x <= 2.9e-139: tmp = (math.log(y) * -0.5) - z elif x <= 6.2e+26: tmp = t_0 else: tmp = x - z return tmp
function code(x, y, z) t_0 = Float64(y - Float64(log(y) * Float64(y + 0.5))) tmp = 0.0 if (x <= -2.5e+36) tmp = Float64(x - z); elseif (x <= 1.6e-280) tmp = t_0; elseif (x <= 2.9e-139) tmp = Float64(Float64(log(y) * -0.5) - z); elseif (x <= 6.2e+26) tmp = t_0; else tmp = Float64(x - z); end return tmp end
function tmp_2 = code(x, y, z) t_0 = y - (log(y) * (y + 0.5)); tmp = 0.0; if (x <= -2.5e+36) tmp = x - z; elseif (x <= 1.6e-280) tmp = t_0; elseif (x <= 2.9e-139) tmp = (log(y) * -0.5) - z; elseif (x <= 6.2e+26) tmp = t_0; else tmp = x - z; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(y - N[(N[Log[y], $MachinePrecision] * N[(y + 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.5e+36], N[(x - z), $MachinePrecision], If[LessEqual[x, 1.6e-280], t$95$0, If[LessEqual[x, 2.9e-139], N[(N[(N[Log[y], $MachinePrecision] * -0.5), $MachinePrecision] - z), $MachinePrecision], If[LessEqual[x, 6.2e+26], t$95$0, N[(x - z), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y - \log y \cdot \left(y + 0.5\right)\\
\mathbf{if}\;x \leq -2.5 \cdot 10^{+36}:\\
\;\;\;\;x - z\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{-280}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 2.9 \cdot 10^{-139}:\\
\;\;\;\;\log y \cdot -0.5 - z\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{+26}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x - z\\
\end{array}
\end{array}
if x < -2.49999999999999988e36 or 6.1999999999999999e26 < x Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
associate-+l+99.9%
associate-+r-99.9%
*-commutative99.9%
distribute-rgt-neg-in99.9%
fma-define99.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around 0 77.9%
Taylor expanded in x around inf 77.9%
if -2.49999999999999988e36 < x < 1.6e-280 or 2.8999999999999999e-139 < x < 6.1999999999999999e26Initial program 99.8%
associate--l+99.8%
Simplified99.8%
Taylor expanded in z around 0 76.2%
Taylor expanded in x around 0 74.4%
cancel-sign-sub-inv74.4%
+-commutative74.4%
cancel-sign-sub-inv74.4%
Simplified74.4%
if 1.6e-280 < x < 2.8999999999999999e-139Initial program 99.8%
associate--l+99.8%
sub-neg99.8%
associate-+l+99.8%
associate-+r-99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
fma-define99.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around 0 74.3%
Taylor expanded in x around 0 74.3%
Final simplification76.2%
(FPCore (x y z)
:precision binary64
(if (<= y 1.55e-154)
(- x (* (log y) 0.5))
(if (<= y 1.42e+78)
(+ x (- y z))
(if (or (<= y 1.1e+150) (not (<= y 1.22e+178)))
(* y (- 1.0 (log y)))
(- x z)))))
double code(double x, double y, double z) {
double tmp;
if (y <= 1.55e-154) {
tmp = x - (log(y) * 0.5);
} else if (y <= 1.42e+78) {
tmp = x + (y - z);
} else if ((y <= 1.1e+150) || !(y <= 1.22e+178)) {
tmp = y * (1.0 - log(y));
} else {
tmp = x - 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 <= 1.55d-154) then
tmp = x - (log(y) * 0.5d0)
else if (y <= 1.42d+78) then
tmp = x + (y - z)
else if ((y <= 1.1d+150) .or. (.not. (y <= 1.22d+178))) then
tmp = y * (1.0d0 - log(y))
else
tmp = x - z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= 1.55e-154) {
tmp = x - (Math.log(y) * 0.5);
} else if (y <= 1.42e+78) {
tmp = x + (y - z);
} else if ((y <= 1.1e+150) || !(y <= 1.22e+178)) {
tmp = y * (1.0 - Math.log(y));
} else {
tmp = x - z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= 1.55e-154: tmp = x - (math.log(y) * 0.5) elif y <= 1.42e+78: tmp = x + (y - z) elif (y <= 1.1e+150) or not (y <= 1.22e+178): tmp = y * (1.0 - math.log(y)) else: tmp = x - z return tmp
function code(x, y, z) tmp = 0.0 if (y <= 1.55e-154) tmp = Float64(x - Float64(log(y) * 0.5)); elseif (y <= 1.42e+78) tmp = Float64(x + Float64(y - z)); elseif ((y <= 1.1e+150) || !(y <= 1.22e+178)) tmp = Float64(y * Float64(1.0 - log(y))); else tmp = Float64(x - z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= 1.55e-154) tmp = x - (log(y) * 0.5); elseif (y <= 1.42e+78) tmp = x + (y - z); elseif ((y <= 1.1e+150) || ~((y <= 1.22e+178))) tmp = y * (1.0 - log(y)); else tmp = x - z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, 1.55e-154], N[(x - N[(N[Log[y], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.42e+78], N[(x + N[(y - z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 1.1e+150], N[Not[LessEqual[y, 1.22e+178]], $MachinePrecision]], N[(y * N[(1.0 - N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.55 \cdot 10^{-154}:\\
\;\;\;\;x - \log y \cdot 0.5\\
\mathbf{elif}\;y \leq 1.42 \cdot 10^{+78}:\\
\;\;\;\;x + \left(y - z\right)\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{+150} \lor \neg \left(y \leq 1.22 \cdot 10^{+178}\right):\\
\;\;\;\;y \cdot \left(1 - \log y\right)\\
\mathbf{else}:\\
\;\;\;\;x - z\\
\end{array}
\end{array}
if y < 1.54999999999999991e-154Initial program 100.0%
associate--l+100.0%
Simplified100.0%
Taylor expanded in z around 0 72.8%
Taylor expanded in y around 0 72.8%
if 1.54999999999999991e-154 < y < 1.42e78Initial program 99.9%
associate--l+99.9%
Simplified99.9%
Taylor expanded in x around 0 99.9%
+-commutative99.9%
distribute-rgt-in99.9%
distribute-lft-in99.9%
neg-mul-199.9%
distribute-lft-neg-in99.9%
metadata-eval99.9%
associate-*r*99.9%
distribute-rgt-in99.9%
neg-mul-199.9%
sub-neg99.9%
*-rgt-identity99.9%
fma-define99.9%
*-rgt-identity99.9%
Simplified99.9%
Taylor expanded in x around inf 73.2%
if 1.42e78 < y < 1.1e150 or 1.2199999999999999e178 < y Initial program 99.7%
associate--l+99.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
+-commutative99.7%
distribute-rgt-in99.7%
distribute-lft-in99.7%
neg-mul-199.7%
distribute-lft-neg-in99.7%
metadata-eval99.7%
associate-*r*99.7%
distribute-rgt-in99.7%
neg-mul-199.7%
sub-neg99.7%
*-rgt-identity99.7%
fma-define99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in y around inf 66.5%
log-rec66.5%
sub-neg66.5%
Simplified66.5%
if 1.1e150 < y < 1.2199999999999999e178Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
associate-+l+99.9%
associate-+r-99.9%
*-commutative99.9%
distribute-rgt-neg-in99.9%
fma-define100.0%
+-commutative100.0%
distribute-neg-in100.0%
unsub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around 0 70.7%
Taylor expanded in x around inf 70.0%
Final simplification70.4%
(FPCore (x y z)
:precision binary64
(if (<= y 6.5e-153)
(- x (* (log y) 0.5))
(if (<= y 1.35e-52)
(+ x (- y z))
(if (<= y 1.06e-19)
(- (* (log y) -0.5) z)
(if (<= y 1.3e+178) (- x z) (* y (- 1.0 (log y))))))))
double code(double x, double y, double z) {
double tmp;
if (y <= 6.5e-153) {
tmp = x - (log(y) * 0.5);
} else if (y <= 1.35e-52) {
tmp = x + (y - z);
} else if (y <= 1.06e-19) {
tmp = (log(y) * -0.5) - z;
} else if (y <= 1.3e+178) {
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 <= 6.5d-153) then
tmp = x - (log(y) * 0.5d0)
else if (y <= 1.35d-52) then
tmp = x + (y - z)
else if (y <= 1.06d-19) then
tmp = (log(y) * (-0.5d0)) - z
else if (y <= 1.3d+178) 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 <= 6.5e-153) {
tmp = x - (Math.log(y) * 0.5);
} else if (y <= 1.35e-52) {
tmp = x + (y - z);
} else if (y <= 1.06e-19) {
tmp = (Math.log(y) * -0.5) - z;
} else if (y <= 1.3e+178) {
tmp = x - z;
} else {
tmp = y * (1.0 - Math.log(y));
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= 6.5e-153: tmp = x - (math.log(y) * 0.5) elif y <= 1.35e-52: tmp = x + (y - z) elif y <= 1.06e-19: tmp = (math.log(y) * -0.5) - z elif y <= 1.3e+178: tmp = x - z else: tmp = y * (1.0 - math.log(y)) return tmp
function code(x, y, z) tmp = 0.0 if (y <= 6.5e-153) tmp = Float64(x - Float64(log(y) * 0.5)); elseif (y <= 1.35e-52) tmp = Float64(x + Float64(y - z)); elseif (y <= 1.06e-19) tmp = Float64(Float64(log(y) * -0.5) - z); elseif (y <= 1.3e+178) 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 <= 6.5e-153) tmp = x - (log(y) * 0.5); elseif (y <= 1.35e-52) tmp = x + (y - z); elseif (y <= 1.06e-19) tmp = (log(y) * -0.5) - z; elseif (y <= 1.3e+178) tmp = x - z; else tmp = y * (1.0 - log(y)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, 6.5e-153], N[(x - N[(N[Log[y], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.35e-52], N[(x + N[(y - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.06e-19], N[(N[(N[Log[y], $MachinePrecision] * -0.5), $MachinePrecision] - z), $MachinePrecision], If[LessEqual[y, 1.3e+178], 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 6.5 \cdot 10^{-153}:\\
\;\;\;\;x - \log y \cdot 0.5\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{-52}:\\
\;\;\;\;x + \left(y - z\right)\\
\mathbf{elif}\;y \leq 1.06 \cdot 10^{-19}:\\
\;\;\;\;\log y \cdot -0.5 - z\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{+178}:\\
\;\;\;\;x - z\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(1 - \log y\right)\\
\end{array}
\end{array}
if y < 6.50000000000000032e-153Initial program 100.0%
associate--l+100.0%
Simplified100.0%
Taylor expanded in z around 0 72.8%
Taylor expanded in y around 0 72.8%
if 6.50000000000000032e-153 < y < 1.35000000000000005e-52Initial program 100.0%
associate--l+100.0%
Simplified100.0%
Taylor expanded in x around 0 100.0%
+-commutative100.0%
distribute-rgt-in100.0%
distribute-lft-in100.0%
neg-mul-1100.0%
distribute-lft-neg-in100.0%
metadata-eval100.0%
associate-*r*100.0%
distribute-rgt-in100.0%
neg-mul-1100.0%
sub-neg100.0%
*-rgt-identity100.0%
fma-define100.0%
*-rgt-identity100.0%
Simplified100.0%
Taylor expanded in x around inf 81.8%
if 1.35000000000000005e-52 < y < 1.06e-19Initial program 100.0%
associate--l+100.0%
sub-neg100.0%
associate-+l+100.0%
associate-+r-100.0%
*-commutative100.0%
distribute-rgt-neg-in100.0%
fma-define100.0%
+-commutative100.0%
distribute-neg-in100.0%
unsub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around 0 100.0%
Taylor expanded in x around 0 100.0%
if 1.06e-19 < y < 1.3e178Initial program 99.8%
associate--l+99.8%
sub-neg99.8%
associate-+l+99.8%
associate-+r-99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
fma-define99.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around 0 61.9%
Taylor expanded in x around inf 60.7%
if 1.3e178 < y Initial program 99.6%
associate--l+99.6%
Simplified99.6%
Taylor expanded in x around 0 99.6%
+-commutative99.6%
distribute-rgt-in99.6%
distribute-lft-in99.6%
neg-mul-199.6%
distribute-lft-neg-in99.6%
metadata-eval99.6%
associate-*r*99.6%
distribute-rgt-in99.6%
neg-mul-199.6%
sub-neg99.6%
*-rgt-identity99.6%
fma-define99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in y around inf 74.3%
log-rec74.3%
sub-neg74.3%
Simplified74.3%
Final simplification71.0%
(FPCore (x y z) :precision binary64 (if (or (<= y 3.55e+22) (and (not (<= y 7.6e+42)) (<= y 1.4e+70))) (- (+ x (* (log y) -0.5)) z) (- (+ x y) (* y (log y)))))
double code(double x, double y, double z) {
double tmp;
if ((y <= 3.55e+22) || (!(y <= 7.6e+42) && (y <= 1.4e+70))) {
tmp = (x + (log(y) * -0.5)) - z;
} else {
tmp = (x + y) - (y * 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 <= 3.55d+22) .or. (.not. (y <= 7.6d+42)) .and. (y <= 1.4d+70)) then
tmp = (x + (log(y) * (-0.5d0))) - z
else
tmp = (x + y) - (y * log(y))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= 3.55e+22) || (!(y <= 7.6e+42) && (y <= 1.4e+70))) {
tmp = (x + (Math.log(y) * -0.5)) - z;
} else {
tmp = (x + y) - (y * Math.log(y));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= 3.55e+22) or (not (y <= 7.6e+42) and (y <= 1.4e+70)): tmp = (x + (math.log(y) * -0.5)) - z else: tmp = (x + y) - (y * math.log(y)) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= 3.55e+22) || (!(y <= 7.6e+42) && (y <= 1.4e+70))) tmp = Float64(Float64(x + Float64(log(y) * -0.5)) - z); else tmp = Float64(Float64(x + y) - Float64(y * log(y))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= 3.55e+22) || (~((y <= 7.6e+42)) && (y <= 1.4e+70))) tmp = (x + (log(y) * -0.5)) - z; else tmp = (x + y) - (y * log(y)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, 3.55e+22], And[N[Not[LessEqual[y, 7.6e+42]], $MachinePrecision], LessEqual[y, 1.4e+70]]], N[(N[(x + N[(N[Log[y], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision], N[(N[(x + y), $MachinePrecision] - N[(y * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 3.55 \cdot 10^{+22} \lor \neg \left(y \leq 7.6 \cdot 10^{+42}\right) \land y \leq 1.4 \cdot 10^{+70}:\\
\;\;\;\;\left(x + \log y \cdot -0.5\right) - z\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) - y \cdot \log y\\
\end{array}
\end{array}
if y < 3.5500000000000001e22 or 7.5999999999999997e42 < y < 1.39999999999999995e70Initial program 100.0%
associate--l+100.0%
sub-neg100.0%
associate-+l+100.0%
associate-+r-100.0%
*-commutative100.0%
distribute-rgt-neg-in100.0%
fma-define100.0%
+-commutative100.0%
distribute-neg-in100.0%
unsub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around 0 96.4%
if 3.5500000000000001e22 < y < 7.5999999999999997e42 or 1.39999999999999995e70 < y Initial program 99.7%
associate--l+99.7%
Simplified99.7%
Taylor expanded in z around 0 87.6%
Taylor expanded in y around inf 87.6%
mul-1-neg87.6%
distribute-rgt-neg-in87.6%
log-rec87.6%
remove-double-neg87.6%
Simplified87.6%
Final simplification92.2%
(FPCore (x y z)
:precision binary64
(if (<= y 1.2e+78)
(+ x (- y z))
(if (or (<= y 1.16e+149) (not (<= y 9.5e+177)))
(* y (- 1.0 (log y)))
(- x z))))
double code(double x, double y, double z) {
double tmp;
if (y <= 1.2e+78) {
tmp = x + (y - z);
} else if ((y <= 1.16e+149) || !(y <= 9.5e+177)) {
tmp = y * (1.0 - log(y));
} else {
tmp = x - 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 <= 1.2d+78) then
tmp = x + (y - z)
else if ((y <= 1.16d+149) .or. (.not. (y <= 9.5d+177))) then
tmp = y * (1.0d0 - log(y))
else
tmp = x - z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= 1.2e+78) {
tmp = x + (y - z);
} else if ((y <= 1.16e+149) || !(y <= 9.5e+177)) {
tmp = y * (1.0 - Math.log(y));
} else {
tmp = x - z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= 1.2e+78: tmp = x + (y - z) elif (y <= 1.16e+149) or not (y <= 9.5e+177): tmp = y * (1.0 - math.log(y)) else: tmp = x - z return tmp
function code(x, y, z) tmp = 0.0 if (y <= 1.2e+78) tmp = Float64(x + Float64(y - z)); elseif ((y <= 1.16e+149) || !(y <= 9.5e+177)) tmp = Float64(y * Float64(1.0 - log(y))); else tmp = Float64(x - z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= 1.2e+78) tmp = x + (y - z); elseif ((y <= 1.16e+149) || ~((y <= 9.5e+177))) tmp = y * (1.0 - log(y)); else tmp = x - z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, 1.2e+78], N[(x + N[(y - z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 1.16e+149], N[Not[LessEqual[y, 9.5e+177]], $MachinePrecision]], N[(y * N[(1.0 - N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.2 \cdot 10^{+78}:\\
\;\;\;\;x + \left(y - z\right)\\
\mathbf{elif}\;y \leq 1.16 \cdot 10^{+149} \lor \neg \left(y \leq 9.5 \cdot 10^{+177}\right):\\
\;\;\;\;y \cdot \left(1 - \log y\right)\\
\mathbf{else}:\\
\;\;\;\;x - z\\
\end{array}
\end{array}
if y < 1.1999999999999999e78Initial program 100.0%
associate--l+100.0%
Simplified100.0%
Taylor expanded in x around 0 100.0%
+-commutative100.0%
distribute-rgt-in100.0%
distribute-lft-in100.0%
neg-mul-1100.0%
distribute-lft-neg-in100.0%
metadata-eval100.0%
associate-*r*100.0%
distribute-rgt-in100.0%
neg-mul-1100.0%
sub-neg100.0%
*-rgt-identity100.0%
fma-define100.0%
*-rgt-identity100.0%
Simplified100.0%
Taylor expanded in x around inf 70.0%
if 1.1999999999999999e78 < y < 1.16e149 or 9.49999999999999996e177 < y Initial program 99.7%
associate--l+99.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
+-commutative99.7%
distribute-rgt-in99.7%
distribute-lft-in99.7%
neg-mul-199.7%
distribute-lft-neg-in99.7%
metadata-eval99.7%
associate-*r*99.7%
distribute-rgt-in99.7%
neg-mul-199.7%
sub-neg99.7%
*-rgt-identity99.7%
fma-define99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in y around inf 66.5%
log-rec66.5%
sub-neg66.5%
Simplified66.5%
if 1.16e149 < y < 9.49999999999999996e177Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
associate-+l+99.9%
associate-+r-99.9%
*-commutative99.9%
distribute-rgt-neg-in99.9%
fma-define100.0%
+-commutative100.0%
distribute-neg-in100.0%
unsub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around 0 70.7%
Taylor expanded in x around inf 70.0%
Final simplification68.7%
(FPCore (x y z) :precision binary64 (if (<= y 0.027) (- (+ x (* (log y) -0.5)) z) (+ x (- (* y (- 1.0 (log y))) z))))
double code(double x, double y, double z) {
double tmp;
if (y <= 0.027) {
tmp = (x + (log(y) * -0.5)) - z;
} else {
tmp = x + ((y * (1.0 - log(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 <= 0.027d0) then
tmp = (x + (log(y) * (-0.5d0))) - z
else
tmp = x + ((y * (1.0d0 - log(y))) - z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= 0.027) {
tmp = (x + (Math.log(y) * -0.5)) - z;
} else {
tmp = x + ((y * (1.0 - Math.log(y))) - z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= 0.027: tmp = (x + (math.log(y) * -0.5)) - z else: tmp = x + ((y * (1.0 - math.log(y))) - z) return tmp
function code(x, y, z) tmp = 0.0 if (y <= 0.027) tmp = Float64(Float64(x + Float64(log(y) * -0.5)) - z); else tmp = Float64(x + Float64(Float64(y * Float64(1.0 - log(y))) - z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= 0.027) tmp = (x + (log(y) * -0.5)) - z; else tmp = x + ((y * (1.0 - log(y))) - z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, 0.027], N[(N[(x + N[(N[Log[y], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision], N[(x + N[(N[(y * N[(1.0 - N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 0.027:\\
\;\;\;\;\left(x + \log y \cdot -0.5\right) - z\\
\mathbf{else}:\\
\;\;\;\;x + \left(y \cdot \left(1 - \log y\right) - z\right)\\
\end{array}
\end{array}
if y < 0.0269999999999999997Initial program 100.0%
associate--l+100.0%
sub-neg100.0%
associate-+l+100.0%
associate-+r-100.0%
*-commutative100.0%
distribute-rgt-neg-in100.0%
fma-define100.0%
+-commutative100.0%
distribute-neg-in100.0%
unsub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around 0 98.8%
if 0.0269999999999999997 < y Initial program 99.7%
associate--l+99.7%
sub-neg99.7%
associate-+l+99.7%
associate-+r-99.7%
*-commutative99.7%
distribute-rgt-neg-in99.7%
fma-define99.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 99.1%
log-rec99.1%
sub-neg99.1%
Simplified99.1%
Final simplification99.0%
(FPCore (x y z) :precision binary64 (+ (- x (* (log y) (+ y 0.5))) (- y z)))
double code(double x, double y, double z) {
return (x - (log(y) * (y + 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 - (log(y) * (y + 0.5d0))) + (y - z)
end function
public static double code(double x, double y, double z) {
return (x - (Math.log(y) * (y + 0.5))) + (y - z);
}
def code(x, y, z): return (x - (math.log(y) * (y + 0.5))) + (y - z)
function code(x, y, z) return Float64(Float64(x - Float64(log(y) * Float64(y + 0.5))) + Float64(y - z)) end
function tmp = code(x, y, z) tmp = (x - (log(y) * (y + 0.5))) + (y - z); end
code[x_, y_, z_] := N[(N[(x - N[(N[Log[y], $MachinePrecision] * N[(y + 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \log y \cdot \left(y + 0.5\right)\right) + \left(y - z\right)
\end{array}
Initial program 99.8%
associate--l+99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z) :precision binary64 (if (or (<= z -3e+50) (not (<= z 8.5e-10))) (- z) x))
double code(double x, double y, double z) {
double tmp;
if ((z <= -3e+50) || !(z <= 8.5e-10)) {
tmp = -z;
} else {
tmp = x;
}
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 <= (-3d+50)) .or. (.not. (z <= 8.5d-10))) then
tmp = -z
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -3e+50) || !(z <= 8.5e-10)) {
tmp = -z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -3e+50) or not (z <= 8.5e-10): tmp = -z else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -3e+50) || !(z <= 8.5e-10)) tmp = Float64(-z); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -3e+50) || ~((z <= 8.5e-10))) tmp = -z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -3e+50], N[Not[LessEqual[z, 8.5e-10]], $MachinePrecision]], (-z), x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{+50} \lor \neg \left(z \leq 8.5 \cdot 10^{-10}\right):\\
\;\;\;\;-z\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.9999999999999998e50 or 8.4999999999999996e-10 < z Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
associate-+l+99.9%
associate-+r-99.9%
*-commutative99.9%
distribute-rgt-neg-in99.9%
fma-define99.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around inf 59.6%
neg-mul-159.6%
Simplified59.6%
if -2.9999999999999998e50 < z < 8.4999999999999996e-10Initial program 99.8%
associate--l+99.8%
sub-neg99.8%
associate-+l+99.8%
associate-+r-99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
fma-define99.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 42.4%
Final simplification49.2%
(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.8%
associate--l+99.8%
sub-neg99.8%
associate-+l+99.8%
associate-+r-99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
fma-define99.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around 0 69.2%
Taylor expanded in x around inf 55.9%
Final simplification55.9%
(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.8%
associate--l+99.8%
sub-neg99.8%
associate-+l+99.8%
associate-+r-99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
fma-define99.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 33.0%
Final simplification33.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 2024053
(FPCore (x y z)
:name "Numeric.SpecFunctions:stirlingError from math-functions-0.1.5.2"
:precision binary64
:alt
(- (- (+ y x) z) (* (+ y 0.5) (log y)))
(- (+ (- x (* (+ y 0.5) (log y))) y) z))