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
As noted in #199, unsigned Fixed and signed Normed are mathematically definable, but we still have some preparations to implement them.
Although those types are certainly not used often, but in fact, I occasionally use unsigned Fixed in private projects. In that case, I give those types redundant names.
However, when we handle concrete Fixed/Normed numbers, we often use the aliases (e.g., Q0f7, N0f8). If we have the predetermined aliases for unsigned Fixed and signed Normed, they can be used to make the future migration easier.
It's hard to support those types right now, but they imply that the way to distinguish between signed/unsigned according to the number of bits (i.e. x+y == 8sizeof(T)/1+x+y == 8sizeof(T)) is a bad idea.
Therefore, I am beginning to think that using two letters (i.e. UQxfy/SNxfy) is a better option.
Therefore, I am beginning to think that using two letters (i.e. UQxfy/SNxfy) is a better option.
Personally, I think it declaring S and/or U is a good direction (instead of only implying it with the sum of x and y being 1 bit smaller than the intended width).
We use S in the comments of embedded c code to document signed. [S3, 4] [1, 15] [S31, 0]
WRT scaling fixed point numbers: some people interpret y as a binary/radix point, instead of strictly the number of fractional bits. The value of the binary point having a wider range. It can be negative or larger than the number of bits in the underlying type. This gives more scaling flexibility to the underlying bits being used.
BTW, Thanks for working on fixed point number support for Julia!
As noted in #199, unsigned
Fixed
and signedNormed
are mathematically definable, but we still have some preparations to implement them.Although those types are certainly not used often, but in fact, I occasionally use unsigned
Fixed
in private projects. In that case, I give those types redundant names.However, when we handle concrete
Fixed
/Normed
numbers, we often use the aliases (e.g.,Q0f7
,N0f8
). If we have the predetermined aliases for unsignedFixed
and signedNormed
, they can be used to make the future migration easier.See also #51
Candidates
unsigned
Fixed
UQxfy
(Unsigned Q)Qxfy
(x+y == 8sizeof(T)
)Uxfy
(Unsigned)Rxfy
(followingQ
)Fxfy
(Fixed)Xxfy
(fiXed)signed
Normed
SNxfy
(Signed N)Nxfy
(1+x+y == 8sizeof(T)
)Sxfy
(Signed. cf. WIP/RFC/Scary: allow signed Normed numbers #143)Mxfy
(norMed. followed byN
)Renaming
Nxfy
toUNxfy
is a consistent practice, but it defeats the purpose of making the migration easier.The text was updated successfully, but these errors were encountered: