Skip to content

Adding rounding functions for Fixed #153

Closed
@kimikage

Description

@kimikage

As I mentioned in #139, there are no rounding functions for Fixed.

julia> round(0.502N0f8)
1.0N0f8

julia> round(0.500Q0f7)
ERROR: MethodError: no method matching round(::Fixed{Int8,7}, ::RoundingMode{:Nearest})

An important difference between Normed and Fixed is that Normed has no tie (or half) numbers, but Fixed has.
So, I also think it is a good idea to support the 2nd argument (i.e. RoundingMode) explicitly.

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