Skip to content
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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

kris524
Copy link
Owner

@kris524 kris524 commented Jun 17, 2022

No description provided.

@kris524 kris524 changed the title Start Pair contract + Math lib Start Pair contract + Math + UQ112x112 libs Jun 19, 2022
@kris524
Copy link
Owner Author

kris524 commented Jun 19, 2022

I have added the basic libraries. Next I will continue with the Pair contract

}

pub mod UQ112x112 {
const Q112: U224 = 2**112;
Copy link
Collaborator

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.

Copy link
Owner Author

@kris524 kris524 Jun 29, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants