Skip to content

document rem(x,T) / x % T for T a type #20707

@felixrehren

Description

@felixrehren

Hello,

I'm not sure what this is doing

julia> 130 % Int8
-126

methods(%) shows that % is the same as rem, and that there are definitions of rem(::IntX,::Type{IntY}) for all pairs X,Y \in {8,16,32,64,128} (and unsigned equivalents). These do not seem to be documented.

(As an aside: there's some behaviour with Bools here as well. x % Bool for x::Integer returns whether x is odd. Furthermore x % true == 0 for all x and x % false gives a DivideError. In conclusion: ???)

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsThis change adds or pertains to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions