You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# constructor for manipulating the representation;
17
17
# selected by passing an extra dummy argument
18
-
Fixed{T, f}(i::Integer, _) where {T,f} =new{T, f}(i % T)
18
+
functionFixed{T, f}(i::Integer, _) where {T, f}
19
+
if f ==bitwidth(T)
20
+
Base.depwarn("`Fixed` reserves one bit for the sign. Support for `f=$f` with raw type `T=$T` will be removed in a future release.", :Fixed)
21
+
end
22
+
0<= f <=bitwidth(T) ||throw(DomainError(f, "f must be between 0 and $(bitwidth(T)-1) (i.e. the number of non-sign bits of `T=$T`)")) #TODO: change the upper limit
23
+
new{T, f}(i % T)
24
+
end
19
25
end
20
26
21
27
Fixed{T, f}(x::AbstractChar) where {T,f} =throw(ArgumentError("Fixed cannot be constructed from a Char"))
0 commit comments