Crate amplify_num

Source
Expand description

Custom-sized numeric types

Implementation of a various integer types with custom bit dimension. This includes:

  • large signed and unsigned integers, named large int types (256, 512, 1024-bit)
  • custom sub-8 bit unsigned integers, named small int types (from 1 to 7-bit)
  • 24-, 40-, 48- and 56-bit unsigned integer.

The functions here are designed to be fast.

Modules§

error
hex
Hex encoding and decoding
posit

Structs§

i256
Large integer type
i512
Large integer type
i1024
Large integer type
u1
1-bit unsigned integer in the range 0..1. It can be used instead of bool when 1-bit numeric (and not boolean) arithmetic is required
u2
2-bit unsigned integer in the range 0..4
u3
3-bit unsigned integer in the range 0..8
u4
4-bit unsigned integer in the range 0..16
u5
5-bit unsigned integer in the range 0..32
u6
6-bit unsigned integer in the range 0..64
u7
7-bit unsigned integer in the range 0..128
u24
24-bit unsigned integer in the range 0..16_777_216
u40
40-bit unsigned integer in the range 0..2^40
u48
48-bit unsigned integer in the range 0..2^48
u56
56-bit unsigned integer in the range 0..2^56
u256
Large integer type
u512
Large integer type
u1024
Large integer type