Skip to content

Lab2#217

Open
Var-S wants to merge 20 commits intosomov7:mainfrom
Var-S:lab2
Open

Lab2#217
Var-S wants to merge 20 commits intosomov7:mainfrom
Var-S:lab2

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