Skip to content

Commit e5a823e

Browse files
Save a division
1 parent a365ecf commit e5a823e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/e_lgamma_r.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ function _logabsgamma(x::Float64)
108108
# ix ≥ 0x43300000 && return Inf, signgam #= |x|>=2**52, must be -integer =#
109109
t = sinpi(x)
110110
iszero(t) && return Inf, signgam #= -integer =#
111-
nadj = log/ abs(t * x))
111+
nadj = logπ - log(abs(t * x))
112112
if t < 0.0; signgam = -1; end
113113
x = -x
114114
end

src/e_lgammaf_r.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function _logabsgamma(x::Float32)
3636
# ix ≥ 0x4b000000 && return Inf32, signgam #= |x|>=2**23, must be -integer =#
3737
t = sinpi(x)
3838
t == 0.0f0 && return Inf32, signgam #= -integer =#
39-
nadj = log/ abs(t * x))
39+
nadj = logπ - log(abs(t * x))
4040
if t < 0.0f0; signgam = -1; end
4141
x = -x
4242
end

0 commit comments

Comments
 (0)