Skip to content

Commit

Permalink
Update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
LilithHafner authored Nov 4, 2024
1 parent 232402d commit 79d3f77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/intfuncs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ lcm(a::T, b::T) where T<:Real = throw(MethodError(lcm, (a,b)))

gcd(abc::AbstractArray{<:Real}) = reduce(gcd, abc; init=zero(eltype(abc)))
function lcm(abc::AbstractArray{<:Real})
# Setting init=one(eltype(abc)) is buggy for Rationals.
# Using reduce with init=one(eltype(abc)) is buggy for Rationals.
l = length(abc)
l == 0 && return one(eltype(abc))
l == 1 && return abs(only(abc))
Expand Down

0 comments on commit 79d3f77

Please sign in to comment.