Skip to content

Rounding infinite Rationals #34657

@sostock

Description

@sostock

Rounding 1//0 and -1//0 only works when a rounding mode is given:

julia> round(1//0, RoundNearest)
1//0

julia> round(1//0)
ERROR: DivideError: integer division error

I will make a PR for this later.

Edit: trunc, floor and ceil also do not support infinite Rationals.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions