Skip to content

[RFC] Orthogonality between signed/unsigned and Fixed/Normed #199

Open
@kimikage

Description

@kimikage

As commented in #143 (comment), Fixed/Normed (i.e. the difference in scaling factor) and signed/unsigned are orthogonal concepts.

Type (scaling) Fixed (2^f) Normed (2^f-1)
signed ✔️ ❌ N/A
unsigned ❌ N/A ✔️

Historically, Fixed is signed and Normed is unsigned, but I think we should separate the two orthogonal concepts as much as possible.

I do not intend to support unsigned Fixed and signed Normed right now. However, I think that it is "safe" to describe in README.md that they may be supported in the future, because we have no systematic way to notify the downstream packages of the breaking changes to the existing Fixed and Normed.
(Whether relaxing is considered "safe" or "unsafe" depends on the point of view.)

At least I think it is worth writing that in CONTRIBUTING.md. It clarifies whether the code should be written in "src/FixedPointNumbers.jl", "fixed.jl" or "normed.jl". I think that the code which is not related to scaling factors should be written in "src/FixedPointNumbers.jl", i.e. should be commonized.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions