These are inspired by VHDL's signed and unsigned datatypes, fixed arbitrary-sized integers with defined overflow semantics. It should act as a subtype of BitArray (itself a subtype of LogicArray). Meaning it should appear to functions as an Array<Bit> in addition to other operators.
Interface
It should expose arithmetic operations in addition to the bitwise logic operators:
+, -, / (truncating), *, %, >>, <<, unary +, unary -
It should be convertible as value to and from the following types:
- C++ integer types
- C++ float types
Sfixed
Ufixed
Float
- each other
Implementation
It should use integers under the hood. An initial pass might just use 64-bit ints and limit the size < 64, but something like GMP arbitrary precision integers might be used in a future pass.
These are inspired by VHDL's
signedandunsigneddatatypes, fixed arbitrary-sized integers with defined overflow semantics. It should act as a subtype of BitArray (itself a subtype of LogicArray). Meaning it should appear to functions as anArray<Bit>in addition to other operators.Interface
It should expose arithmetic operations in addition to the bitwise logic operators:
+,-,/(truncating),*,%,>>,<<, unary+, unary-It should be convertible as value to and from the following types:
SfixedUfixedFloatImplementation
It should use integers under the hood. An initial pass might just use 64-bit ints and limit the size < 64, but something like GMP arbitrary precision integers might be used in a future pass.