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

Lab2 #217

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open

Lab2 #217

wants to merge 20 commits into from

Conversation

Var-S
Copy link

@Var-S Var-S commented Feb 26, 2022

No description provided.

Copy link
Owner

@somov7 somov7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-3 за замечания
+1 за деление
+2 за 1024
8

}

uint1024_t add_op(uint1024_t x, uint1024_t y) {
int trans_reg = 0;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Правильное слово carry

int count2 = sizeof(y.array)/sizeof(y.array[0]);
for (size_t i=0; i<count; ++i)
for (int j=0, carry=0; j<count2 || carry; ++j) {
long long cur = c.array[i+j] + (long long)x.array[i] *(j < count2 ? y.array[j] : 0) + carry;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Если будут большие числа, то будет выход за границы массива
-1


}

uint1024_t segmentation(uint1024_t x, long long y){
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

division

}


uint1024_t subtr_op(uint1024_t x, uint1024_t y) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не работает
-2

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