- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 5.7k
Closed
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviormathsMathematical functionsMathematical functions
Description
help?> round(Float64, 1.2)
  round([T,] x, [r::RoundingMode])
  round(x, [r::RoundingMode]; digits::Integer=0, base = 10)
  round(x, [r::RoundingMode]; sigdigits::Integer, base = 10)
  Rounds the number x.
  Without keyword arguments, x is rounded to an integer value, returning a value 
  of type T, or of the same type of x if no T is provided. An InexactError will be 
  thrown if the value is not representable by T, similar to convert.
...
julia> round(Float64, 1.2)
ERROR: MethodError: no method matching round(::Type{Float64}, ::Float64)
Closest candidates are:
  round(::Type{Bool}, ::AbstractFloat)
   @ Base float.jl:391
  round(::Type{T}, ::AbstractFloat, ::RoundingMode) where T<:Integer
   @ Base floatfuncs.jl:122
  round(::Type{T}, ::AbstractFloat) where T<:Integer
   @ Base float.jl:385
  ...
Stacktrace:
 [1] top-level scope
   @ REPL[13]:1Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviormathsMathematical functionsMathematical functions