File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -93,18 +93,19 @@ function _logabsgamma(x::Float64)
93
93
94
94
#= purge off +-inf, NaN, +-0, tiny and negative arguments =#
95
95
signgam = 1
96
+ isneg = hx < Int32 (0 )
96
97
ix = hx & 0x7fffffff
97
98
ix ≥ 0x7ff00000 && return x * x, signgam
98
99
ix | lx == 0x00000000 && return Inf , signgam
99
100
if ix < 0x3b900000 #= |x|<2**-70, return -log(|x|) =#
100
- if hx < Int32 ( 0 )
101
+ if isneg
101
102
signgam = - 1
102
103
return - log (- x), signgam
103
104
else
104
105
return - log (x), signgam
105
106
end
106
107
end
107
- if hx < Int32 ( 0 )
108
+ if isneg
108
109
# ix ≥ 0x43300000 && return Inf, signgam #= |x|>=2**52, must be -integer =#
109
110
t = sinpi (x)
110
111
iszero (t) && return Inf , signgam #= -integer =#
@@ -168,7 +169,7 @@ function _logabsgamma(x::Float64)
168
169
else #= 2^58 ≤ x ≤ Inf =#
169
170
r = muladd (x, log (x), - x)
170
171
end
171
- if hx < Int32 ( 0 )
172
+ if isneg
172
173
r = nadj - r
173
174
end
174
175
return r, signgam
You can’t perform that action at this time.
0 commit comments