Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing rounding method #176

Closed
LilithHafner opened this issue Aug 31, 2023 · 0 comments · Fixed by #177
Closed

Missing rounding method #176

LilithHafner opened this issue Aug 31, 2023 · 0 comments · Fixed by #177

Comments

@LilithHafner
Copy link
Contributor

julia> round(pi, RoundUp)
4.0

julia> round(Double16(pi), RoundUp)
4.0

julia> round(pi, RoundToZero)
3.0

julia> round(Double16(pi), RoundToZero)
ERROR: MethodError: no method matching round(::Double16, ::RoundingMode{:ToZero})

Closest candidates are:
  round(::Real, ::RoundingMode; digits, sigdigits, base)
   @ Base floatfuncs.jl:128
  round(::Quadmath.Float128, ::RoundingMode{:ToZero})
   @ Quadmath ~/.julia/packages/Quadmath/9AEus/src/Quadmath.jl:338
  round(::Missing, ::RoundingMode; sigdigits, digits, base)
   @ Base missing.jl:143
  ...

Stacktrace:
 [1] round(x::Double16, r::RoundingMode{:ToZero}; digits::Nothing, sigdigits::Nothing, base::Nothing)
   @ Base ./floatfuncs.jl:134
 [2] round(x::Double16, r::RoundingMode{:ToZero})
   @ Base ./floatfuncs.jl:128
 [3] top-level scope
   @ REPL[33]:1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant