Skip to content

Should div(typemin(Int), -1 throw OverflowError instead of DivideError? #14273

@eschnett

Description

@eschnett

Currently, div(typemin(Int), -1 throws a DivideError. Should it throw an OverflowError instead? Arguably, there's nothing wrong per se in dividing by -1; it's just that the type Int can't hold the result.

Metadata

Metadata

Assignees

No one assigned

    Labels

    error handlingHandling of exceptions by Julia or the userperformanceMust go faster

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions