Skip to content

Support for unsigned Fixed-point operations #33

@appetrosyan

Description

@appetrosyan

Sometimes it is obvious that a number cannot be negative (or zero). It is also true of fixed point numbers.

Given this, it would be nice if Fixed supported using the extra bit for the precision, e.g.

  • Fixed<u64> which itself starts from zero, and doesn't carry the sign bit. Internally promotes to u128 just like i64.
  • Fixed<NonZeroU64>. Same as before except it also has a niche.

The implementations for cadd, csub etc. need to be adjusted accordingly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions