-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce Big Integers Library #326
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks great, a few suggestions then very happy to approve
|
||
### Type Conversions | ||
|
||
The Big Integers Library offers a number of different conversion between mathematical type. These include the following: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Big Integers Library offers a number of different conversion between mathematical type. These include the following: | |
The Big Integers Library offers a number of different conversions between mathematical types. These include the following: |
@@ -54,6 +54,10 @@ Math Libraries are libraries which provide mathematic functions or number types | |||
|
|||
The [Signed Integers](./signed_integers/index.md) Library is an interface to implement signed integers. | |||
|
|||
### [Big Integers](./bigint/index.md) | |||
|
|||
The [Big Integers](./bigint/index.md) Library is an interface to implement extremely integers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The [Big Integers](./bigint/index.md) Library is an interface to implement extremely integers. | |
The [Big Integers](./bigint/index.md) Library is an interface to implement extremely large integers. |
self.limbs.len() == other.limbs.len() | ||
} | ||
|
||
/// Returns the number of limbs the `BigUint`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// Returns the number of limbs the `BigUint`. | |
/// Returns the number of limbs the `BigUint` has. |
Type of change
Changes
The following changes have been made:
BigUint
typeThe
BigUint
type has the following functions:new()
equal_limb_size()
number_of_limbs()
limbs()
get_limb()
zero()
is_zero()
The following traits are implemented for the
BigUint
type:Clone
From<u8>
TryInto<u8>
From<u16>
TryInto<u16>
From<u32>
TryInto<u32>
From<u64>
TryInto<u64>
From<U128>
TryInto<U128>
From<u256>
TryInto<u256>
From<Bytes>
Into<Bytes>
Eq
Ord
OrdEq
Add
Multiply
Subtract
Notes
Checklist
Breaking*
orNew Feature
labels where relevant.