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

rounding(::Type{Float16}) #55926

Open
nsajko opened this issue Sep 29, 2024 · 1 comment
Open

rounding(::Type{Float16}) #55926

nsajko opened this issue Sep 29, 2024 · 1 comment
Labels

Comments

@nsajko
Copy link
Contributor

nsajko commented Sep 29, 2024

On my system, which doesn't have native Float16, the method for rounding(Float16) doesn't exist. As far as I see effectively the rounding mode is RoundNearest, no? So I guess the method should be defined and it should return RoundNearest.

@nsajko nsajko added the float16 label Sep 29, 2024
@giordano
Copy link
Contributor

On my system, which doesn't have native Float16

I don't think having native hardware support for Float16 is relevant here, since I get

julia> rounding(Float16)
ERROR: MethodError: no method matching rounding(::Type{Float16})
The function `rounding` exists, but no method is defined for this combination of argument types.

Closest candidates are:
  rounding(::Type{BigFloat})
   @ Base mpfr.jl:169
  rounding(::Type{T}) where T<:Union{Float32, Float64}
   @ Base rounding.jl:222

also on Apple Silicon. And in general I think we should treat Float16 as first-class floating point type, and not as an exception (related to #53745)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants