In theory, the number of fractional bits f can be countlessly large, but what is the actual upper limit?
I assumed that it is 8sizeof(T)-1 for Fixed{T}, and 8sizeof(T) for Normed{T}.
However, the larger numbers are also used actually.
|
for (TI, f) in [(Int8, 8), (Int16, 8), (Int16, 10), (Int32, 16)] |
|
for T in (Fixed{Int8,8}, Fixed{Int16,8}, Fixed{Int16,10}, Fixed{Int32,16}) |
Perhaps some functions do not work properly with large f, due to implicit upper limits.
Edit:
I intend to support Fixed{T,f} where f == 8sizeof(T), i.e. throw no exceptions. However, they have no typealias and will not be tested enough.
In theory, the number of fractional bits
fcan be countlessly large, but what is the actual upper limit?I assumed that it is
8sizeof(T)-1forFixed{T}, and8sizeof(T)forNormed{T}.However, the larger numbers are also used actually.
FixedPointNumbers.jl/test/fixed.jl
Line 63 in 7ad0f0c
FixedPointNumbers.jl/test/fixed.jl
Line 96 in 7ad0f0c
FixedPointNumbers.jl/test/fixed.jl
Line 110 in 7ad0f0c
FixedPointNumbers.jl/test/fixed.jl
Line 138 in 7ad0f0c
Perhaps some functions do not work properly with large
f, due to implicit upper limits.Edit:
I intend to support
Fixed{T,f}wheref == 8sizeof(T), i.e. throw no exceptions. However, they have no typealias and will not be tested enough.