-
Notifications
You must be signed in to change notification settings - Fork 4
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
Start Pair contract + Math + UQ112x112 libs #22
base: master
Are you sure you want to change the base?
Conversation
I have added the basic libraries. Next I will continue with the Pair contract |
} | ||
|
||
pub mod UQ112x112 { | ||
const Q112: U224 = 2**112; |
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.
I am guessing this doesn't build - I don't think **
is a rust operator. You can get the value of 2*112 with 2_u128.pow(112)
. And pow is a constant function so you can assign that to a const Q112: u128
, but I don't see an obvious way to put that value into a U224
constant. You might have to call U224::from
whenever you want to use the constant.
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.
Not sure what to do with that file still. Maybe I will leave it for now and get back to it later
No description provided.