Skip to content

Broken integer rounding for big(Inf) #44662

Closed
@Keno

Description

@Keno
julia> round(Integer, Inf)
ERROR: InexactError: trunc(Int64, Inf)
Stacktrace:
 [1] trunc
   @ ./float.jl:781 [inlined]
 [2] trunc
   @ ./float.jl:354 [inlined]
 [3] round(#unused#::Type{Integer}, x::Float64)
   @ Base ./float.jl:359
 [4] top-level scope
   @ REPL[14]:1

julia> round(Integer, big(Inf))
0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or unintended behaviormathsMathematical functions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions