-
Notifications
You must be signed in to change notification settings - Fork 32
Closed
Description
Normed supports the conversion to Rational, but does not support the conversion from Rational.
julia> N0f8(1//2)
ERROR: MethodError: no method matching unsafe_trunc(::Type{UInt8}, ::Rational{Int64})Fixed supports the conversion from Rational, but it overflows too easily.
julia> Q0f7(1//2)
ERROR: InexactError: trunc(Int8, 128)FixedPointNumbers.jl/src/fixed.jl
Line 15 in 7ad0f0c
| Fixed{T,f}(x::Rational) where {T,f} = Fixed{T,f}(x.num)/Fixed{T,f}(x.den) |
Metadata
Metadata
Assignees
Labels
No labels