Skip to content

lcm(::Vector{<:Rational}) gives the wrong answer. #55379

@cyanescent

Description

@cyanescent

The extension of lcm() and gcd() to both Array and Rational was incorrect. The case of the gcd has been corrected in #34417, but not the lcm:

lcm([1//2;1//2])
1//1 # false 

lcm(1//2,1//2)
1//2 # true

Metadata

Metadata

Assignees

No one assigned

    Labels

    correctness bug ⚠Bugs that are likely to lead to incorrect results in user code without throwingmathsMathematical functions

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions