Skip to content

mod(::Complex{<:Integer}, ::Integer) and div etc. #37376

@stevengj

Description

@stevengj

As discussed on discourse, this seems like the only sensible definition:

mod(z::Complex{<:Integer}, n::Integer) = Complex(mod(real(z), n), mod(imag(z), n))

and similarly for div, rem (and probably divrem).

Should be easy to create a patch (much simpler than #35374): just add the 1-line definitions analogous to the one above, docs, news, and a test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    complexComplex numbersgood first issueIndicates a good issue for first-time contributors to Julia

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions