Hello, I am trying to round a number to the 3rd decimal with Julia 1.1 but I have issues:
julia> beta
0.005208333333333333
julia> round(beta, 3)
ERROR: MethodError: no method matching round(::Float64, ::Int64)
Closest candidates are:
round(::Float64, ::RoundingMode{:Nearest}) at float.jl:370
round(::Float64, ::RoundingMode{:Up}) at float.jl:368
round(::Float64, ::RoundingMode{:Down}) at float.jl:366
...
Stacktrace:
[1] top-level scope at none:0
julia> round(beta, Up)
ERROR: UndefVarError: Up not defined
Stacktrace:
[1] top-level scope at none:0
julia> round(beta, RoundingMode(Up))
ERROR: UndefVarError: Up not defined
Stacktrace:
[1] top-level scope at none:0
julia> RoundNearest(beta)
ERROR: MethodError: objects of type RoundingMode{:Nearest} are not callable
Stacktrace:
[1] top-level scope at none:0
julia> round(beta, RoundNearest)
0.0
julia> ceil(beta)
1.0
what is the current sintax to round a float to the n digit?