-
Notifications
You must be signed in to change notification settings - Fork 32
Closed
Description
floor and ceil are supposed to return the same type as the input type:
floor(x) returns the nearest integral value of the same type as x that is less than or equal to x.
However, floor(N0f8(0.33), digits=1) returns 0.3f0 and ceil(N0f8(0.33), digits=1) returns 0.4f0 i.e. they return Float32.
I haven't tested other types, but since all calls to floor/ceil fallback to the Base definition of floor(x; kwargs...) = round(x, RoundDown; kwargs...) (RoundUp for ceil) and their callchains call float(x), I suspect this is the case for all Normed types.
Found here.
kimikage
Metadata
Metadata
Assignees
Labels
No labels