-
Notifications
You must be signed in to change notification settings - Fork 32
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
base: main
Are you sure you want to change the base?
Lab2 #217
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.
-3 за замечания
+1 за деление
+2 за 1024
8
} | ||
|
||
uint1024_t add_op(uint1024_t x, uint1024_t y) { | ||
int trans_reg = 0; |
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.
Правильное слово 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; |
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.
Если будут большие числа, то будет выход за границы массива
-1
|
||
} | ||
|
||
uint1024_t segmentation(uint1024_t x, long long y){ |
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.
division
} | ||
|
||
|
||
uint1024_t subtr_op(uint1024_t x, uint1024_t y) { |
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.
Не работает
-2
No description provided.