{"id":446291,"date":"2025-01-27T21:04:18","date_gmt":"2025-01-27T21:04:18","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=446291"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2025-01-27T21:04:18","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=446291","title":{"rendered":"<span>DivMod, QuotRem \u0438\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0435?<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u044f\u0441\u044c \u0441 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u043c \u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u0438 \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u043c \u043e\u0442 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u043e\u0439 \u043a\u0430\u043a \u0432 \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437.<\/p>\n<p>\u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043a\u0430\u0436\u0443\u0449\u0443\u044e\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0443 \u0438 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0441\u0442\u0430\u0442\u0435\u0439 \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443, \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043e\u0433\u0440\u043e\u043c\u043d\u0430\u044f \u043f\u0443\u0442\u0430\u043d\u0438\u0446\u0430. \u0412 \u0440\u0430\u0437\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u0430\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 (\u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u044d\u0442\u043e \u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u0433\u0434\u0430 \u0432 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u0445  \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f).<\/p>\n<p>\u0415\u0441\u0442\u044c \u0430\u043d\u0433\u043b\u043e\u044f\u0437\u044b\u0447\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043d\u0430 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Modulo\" rel=\"noopener noreferrer nofollow\">Wikipedia<\/a>, \u0441 \u0444\u043e\u0440\u043c\u0443\u043b\u0430\u043c\u0438, \u0433\u0440\u0430\u0444\u0438\u043a\u0430\u043c\u0438 \u0438 \u0434\u0430\u0436\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u0435\u0439 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0430 \u044d\u0442\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435. \u041e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e \u043d\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0442\u0435\u043c\u0435 \u0438 \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u043e\u0439 \u043d\u0435\u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0421\u0442\u0430\u0442\u044c\u044f \u043d\u0435 \u043f\u0440\u0435\u0442\u0435\u043d\u0434\u0443\u0435\u0442 \u043d\u0430 \u0441\u0440\u044b\u0432 \u043f\u043e\u043a\u0440\u043e\u0432\u043e\u0432, \u0430 \u0441\u043a\u043e\u0440\u0435\u0435 \u0441\u0442\u0440\u0435\u043c\u0438\u0442\u0441\u044f \u0431\u044b\u0442\u044c \u0443\u0434\u043e\u0431\u043d\u043e\u0439 \u0448\u043f\u0430\u0440\u0433\u0430\u043b\u043a\u043e\u0439. \u041b\u0438\u0441\u0442\u0438\u043d\u0433\u043e\u0432 \u043a\u043e\u0434\u0430 \u0438 \u0442\u043e\u0447\u043d\u044b\u0445 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e \u0432 \u0432\u0430\u0448\u0435\u043c \u044f\u0437\u044b\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435 \u0431\u0443\u0434\u0435\u0442, \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0435 \u0444\u043e\u0440\u043c\u0443\u043b\u044b.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/64d\/ff6\/603\/64dff6603761b35862b9d6d92dc86a05.png\" width=\"1282\" height=\"455\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/64d\/ff6\/603\/64dff6603761b35862b9d6d92dc86a05.png\"\/><\/figure>\n<h2>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f<\/h2>\n<h3>\u0414\u0435\u043b\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u2013 \u043d\u0435\u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f.<\/p>\n<p>\u0412\u0441\u0435 \u0437\u043d\u0430\u044e\u0442, \u0447\u0442\u043e \u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430 \u043d\u043e\u043b\u044c \u043d\u0435\u043b\u044c\u0437\u044f (\u0431\u0435\u0437 \u043f\u0440\u0435\u0434\u0435\u043b\u0430), \u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0435 \u0442\u0435\u0440\u043f\u0438\u0442 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043e\u043f\u0435\u0440\u0430\u043d\u0434\u043e\u0432 (\u043d\u0435\u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u0438\u0432\u043d\u043e).<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0435\u0441\u043b\u0438 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0434\u0435\u043b\u0435\u043d\u0438\u0435, \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u0435\u0442 \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u043d\u044e\u0430\u043d\u0441, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0441\u0442\u0430\u0442\u043e\u043a \u043e\u0442 \u0434\u0435\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0442\u043e\u0438\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0434\u0435\u043b\u0435\u043d\u0438\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"[\\;\/\\;]\" alt=\"[\\;\/\\;]\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/b\/ba\/ba8\/ba8b2a991895dcbdd80257de49df14bd.svg\" width=\"auto\" height=\"auto\"\/> \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c <strong>\u0432 \u043e\u0431\u0449\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435<\/strong> \u043f\u0440\u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435, \u0432 \u043e\u0441\u043e\u0431\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438 \u0446\u0435\u043b\u043e\u0435, \u043d\u043e \u044d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438, \u0447\u0442\u043e \u0434\u0435\u043b\u0438\u043c\u043e\u0435 \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c \u043d\u0430\u0446\u0435\u043b\u043e, \u0442\u043e \u0435\u0441\u0442\u044c \u0431\u0435\u0437 \u043e\u0441\u0442\u0430\u0442\u043a\u0430.<\/p>\n<p>\u041e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043c \u044d\u0442\u043e \u043a\u0430\u043a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"a \\;\/\\; b = c\" alt=\"a \\;\/\\; b = c\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/803\/701\/615\/803701615091565acbded8bc1273ca85.svg\" width=\"93\" height=\"28\"\/><\/p>\n<p>\u0433\u0434\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"a\" alt=\"a\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/0c\/0cc\/0cc175b9c0f1b6a831c399e269772661.svg\" width=\"auto\" height=\"auto\"\/> \u2013 \u0434\u0435\u043b\u0438\u043c\u043e\u0435, <img decoding=\"async\" class=\"formula inline\" source=\"b\" alt=\"b\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9\/92\/92e\/92eb5ffee6ae2fec3ad71c777531578f.svg\" width=\"auto\" height=\"auto\"\/> \u2013 \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c, <img decoding=\"async\" class=\"formula inline\" source=\"c\" alt=\"c\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4\/4a\/4a8\/4a8a08f09d37b73795649038408b5f33.svg\" width=\"auto\" height=\"auto\"\/> \u2013 \u0447\u0430\u0441\u0442\u043d\u043e\u0435.<\/p>\n<p>\u0412 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f, <strong>\u0432 \u043e\u0431\u0449\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435<\/strong>, \u0434\u043b\u044f <strong>\u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u0435\u043b\u0435\u043d\u0438\u044f<\/strong> \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0442\u0430\u043a\u0438\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"a = b \\times q + r\" alt=\"a = b \\times q + r\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bf3\/eeb\/5ed\/bf3eeb5edee29bb1abbde1157ad12e8b.svg\" width=\"139\" height=\"25\"\/><\/p>\n<p>\u0433\u0434\u0435<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"q = a \\div b, \\;\\; q \u2208 \\mathbb {Z}\" alt=\"q = a \\div b, \\;\\; q \u2208 \\mathbb {Z}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8ee\/bba\/7dd\/8eebba7dd1495ef2adbaca45bd2f280c.svg\" width=\"180\" height=\"25\"\/><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"r = a \\;\\%\\; b, \\;\\; |r| &lt; |b|\" alt=\"r = a \\;\\%\\; b, \\;\\; |r| &lt; |b|\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/878\/db5\/711\/878db5711c3aefe1268dec698912f520.svg\" width=\"208\" height=\"28\"\/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"a\" alt=\"a\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cae\/b10\/6e5\/caeb106e5b3ce78610d8763743d0d653.svg\" width=\"13\" height=\"14\"\/> \u2013 \u0434\u0435\u043b\u0438\u043c\u043e\u0435,<br \/><img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"b\" alt=\"b\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a02\/0ae\/f5a\/a020aef5a7089ceb832d7eca9a24fca9.svg\" width=\"11\" height=\"21\"\/> \u2013 \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c, \u043f\u0440\u0438\u0447\u0435\u043c <img decoding=\"async\" class=\"formula inline\" source=\"b \\ne 0\" alt=\"b \\ne 0\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/0c\/0c3\/0c3f0e3a4608bac89f6cebab322f2d22.svg\" width=\"auto\" height=\"auto\"\/>,<br \/><img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"q\" alt=\"q\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/13c\/cf0\/b51\/13ccf0b51f2642c79eacaec9d71c7923.svg\" width=\"11\" height=\"18\"\/> \u2013 \u043d\u0435\u043f\u043e\u043b\u043d\u043e\u0435 \u0447\u0430\u0441\u0442\u043d\u043e\u0435,<br \/><img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"r\" alt=\"r\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/aba\/642\/b16\/aba642b16bd9a70d5262b9bbe9a983c7.svg\" width=\"11\" height=\"14\"\/> \u2013 \u043e\u0441\u0442\u0430\u0442\u043e\u043a \u043e\u0442 \u0434\u0435\u043b\u0435\u043d\u0438\u044f,<br \/>\u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438:<br \/> <img decoding=\"async\" class=\"formula inline\" source=\"[\\div]\" alt=\"[\\div]\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4\/45\/45a\/45a5da6bb77331e282f6cc0435456989.svg\" width=\"auto\" height=\"auto\"\/> \u2013 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0434\u0435\u043b\u0435\u043d\u0438\u0435,<br \/> <img decoding=\"async\" class=\"formula inline\" source=\"[\\%]\" alt=\"[\\%]\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6\/6f\/6f4\/6f4ccc6e07375e3b82f2e9007ede9e69.svg\" width=\"auto\" height=\"auto\"\/> \u2013 \u0432\u0437\u044f\u0442\u0438\u0435 \u043e\u0441\u0442\u0430\u0442\u043a\u0430.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043a\u043e\u0440\u043e\u0442\u043a\u043e \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0440\u0435\u0437 \u043e\u043f\u0435\u0440\u0430\u043d\u0434\u044b, \u0442\u043e \u0434\u043b\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0438 \u0432\u0437\u044f\u0442\u0438\u044f \u043e\u0441\u0442\u0430\u0442\u043a\u0430 \u0434\u043e\u043b\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0434\u0430\u043d\u043d\u043e\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"(a \\div b) \\times b + (a \\;\\%\\; b) = a\" alt=\"(a \\div b) \\times b + (a \\;\\%\\; b) = a\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d8f\/58a\/8d8\/d8f58a8d8372c86f4ae71bcd79431433.svg\" width=\"266\" height=\"28\"\/><\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0434\u043b\u044f \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e (\u0415\u0432\u043a\u043b\u0438\u0434\u043e\u0432\u0430) \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441 \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u043c \u0432\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"0 \\leq r &lt; |b|\" alt=\"0 \\leq r &lt; |b|\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d9b\/c17\/bd5\/d9bc17bd5d95c11e5c2741d758dab8cf.svg\" width=\"113\" height=\"28\"\/><\/p>\n<p>\u041a\u043e\u0442\u043e\u0440\u043e\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043d\u0430\u043c, \u0447\u0442\u043e \u043e\u0441\u0442\u0430\u0442\u043e\u043a \u043e\u0442 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0438 \u043d\u0435 \u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u043c \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c. \u0421\u043e\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0440\u0435\u0434\u043a\u043e, \u0430 \u043f\u043e\u0442\u043e\u043c\u0443 \u0438 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0443\u0442\u0430\u043d\u0438\u0446\u0430.<\/p>\n<h3>\u041e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0427\u0442\u043e\u0431\u044b \u043d\u0430\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u0437 \u0447\u0430\u0441\u0442\u043d\u043e\u0433\u043e \u2014 \u043d\u0435\u043f\u043e\u043b\u043d\u043e\u0435 \u0447\u0430\u0441\u0442\u043d\u043e\u0435, \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u043e\u043a\u0440\u0443\u0433\u043b\u0438\u0442\u044c, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u044d\u0442\u0438 \u0441\u0430\u043c\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u044f. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0438\u0445 \u0432\u0432\u0435\u0434\u0435\u043c.<\/p>\n<hr\/>\n<p>\u041e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u0432\u043d\u0438\u0437 <img decoding=\"async\" class=\"formula inline\" source=\"\\lfloor x \\rfloor\" alt=\"\\lfloor x \\rfloor\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/8\/83\/83e\/83ea273cc257e98314f110cb43a14b63.svg\" width=\"auto\" height=\"auto\"\/><br \/>\u041a\u043e\u0433\u0434\u0430 \u0447\u0438\u0441\u043b\u043e \u043e\u043a\u0440\u0443\u0433\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u0438.<br \/>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"y=\\operatorname {floor} (x)= \\operatorname {round\\_dn} (x)= \\left\\lfloor x\\right\\rfloor =-\\left\\lceil -x\\right\\rceil\" alt=\"y=\\operatorname {floor} (x)= \\operatorname {round\\_dn} (x)= \\left\\lfloor x\\right\\rfloor =-\\left\\lceil -x\\right\\rceil\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/570\/874\/079\/570874079731524de413befcaa1ce8e6.svg\" width=\"475\" height=\"28\"\/><\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\displaylines{\\lfloor +23.8 \\rfloor = +23 \\\\\\lfloor +23.2 \\rfloor = +23 \\\\\\lfloor -23.8 \\rfloor = -24 \\\\\\lfloor -23.2 \\rfloor = -24 \\\\}\" alt=\"\\displaylines{\\lfloor +23.8 \\rfloor = +23 \\\\\\lfloor +23.2 \\rfloor = +23 \\\\\\lfloor -23.8 \\rfloor = -24 \\\\\\lfloor -23.2 \\rfloor = -24 \\\\}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/103\/e21\/700\/103e2170013afd8ff321eea0e1100f1c.svg\" width=\"169\" height=\"143\"\/><\/p>\n<hr\/>\n<p>\u041e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u0432\u0432\u0435\u0440\u0445 <img decoding=\"async\" class=\"formula inline\" source=\"\\lceil x \\rceil\" alt=\"\\lceil x \\rceil\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d\/db\/db3\/db3157d147cd04402662b96329ce8f07.svg\" width=\"auto\" height=\"auto\"\/><br \/>\u041a\u043e\u0433\u0434\u0430 \u0447\u0438\u0441\u043b\u043e \u043e\u043a\u0440\u0443\u0433\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"y=\\operatorname{ceil} (x)= \\operatorname {round\\_up} (x)=\\left\\lceil x\\right\\rceil =-\\left\\lfloor -x\\right\\rfloor\" alt=\"y=\\operatorname{ceil} (x)= \\operatorname {round\\_up} (x)=\\left\\lceil x\\right\\rceil =-\\left\\lfloor -x\\right\\rfloor\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/657\/8b0\/5f3\/6578b05f3d8aefbb25f6fbbace5b6faa.svg\" width=\"462\" height=\"28\"\/><\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\displaylines{\\lceil +23.8 \\rceil = +24 \\\\\\lceil +23.2 \\rceil = +24 \\\\\\lceil -23.8 \\rceil = -23 \\\\\\lceil -23.2 \\rceil = -23 \\\\}\" alt=\"\\displaylines{\\lceil +23.8 \\rceil = +24 \\\\\\lceil +23.2 \\rceil = +24 \\\\\\lceil -23.8 \\rceil = -23 \\\\\\lceil -23.2 \\rceil = -23 \\\\}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d6d\/8eb\/c64\/d6d8ebc64b871e5782fbfa78eb59bad5.svg\" width=\"135\" height=\"115\"\/><\/p>\n<hr\/>\n<p>\u041e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u043a \u043d\u0443\u043b\u044e <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\lceil x \\rfloor\" alt=\"\\lceil x \\rfloor\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8ec\/e4a\/28c\/8ece4a28cc3d19553e3e088aec39040d.svg\" width=\"29\" height=\"22\"\/><br \/>\u041a\u043e\u0433\u0434\u0430 \u0447\u0438\u0441\u043b\u043e \u043e\u043a\u0440\u0443\u0433\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u043d\u0443\u043b\u044f. \u0418\u043b\u0438, \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u043e\u043a\u0440\u0443\u0433\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u0432\u0435\u0440\u0445, \u0430 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u043d\u0438\u0437.<br \/>\u0422\u0430\u043a\u0436\u0435 \u044d\u0442\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u043e\u0442\u0441\u0435\u0447\u0435\u043d\u0438\u0435\u043c \u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438.<\/p>\n<p>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"y=\\operatorname {truncate} (x) = \\operatorname {round\\_zero} (x) =  \\lceil x \\rfloor = \\operatorname {sign}(x)\\left\\lfloor \\left|x\\right|\\right\\rfloor =-\\operatorname {sign}(x)\\left\\lceil -\\left|x\\right|\\right\\rceil=\\begin{cases} \\left\\lfloor x \\right\\rfloor &amp;x\\geq 0\\\\[5mu]\\left\\lceil x\\right\\rceil &amp;x&lt;0 \\end{cases}\" alt=\"y=\\operatorname {truncate} (x) = \\operatorname {round\\_zero} (x) =  \\lceil x \\rfloor = \\operatorname {sign}(x)\\left\\lfloor \\left|x\\right|\\right\\rfloor =-\\operatorname {sign}(x)\\left\\lceil -\\left|x\\right|\\right\\rceil=\\begin{cases} \\left\\lfloor x \\right\\rfloor &amp;x\\geq 0\\\\[5mu]\\left\\lceil x\\right\\rceil &amp;x&lt;0 \\end{cases}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/495\/e46\/d04\/495e46d04c3326166993ac26d8b0b6d9.svg\" width=\"970\" height=\"66\"\/><\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\displaylines{\\lceil +23.8 \\rfloor = +23 \\\\\\lceil +23.2 \\rfloor = +23 \\\\\\lceil -23.8 \\rfloor = -23 \\\\\\lceil -23.2 \\rfloor = -23 \\\\}\" alt=\"\\displaylines{\\lceil +23.8 \\rfloor = +23 \\\\\\lceil +23.2 \\rfloor = +23 \\\\\\lceil -23.8 \\rfloor = -23 \\\\\\lceil -23.2 \\rfloor = -23 \\\\}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ca0\/cfa\/8c5\/ca0cfa8c5a054b9c49c498ff44ce8e2a.svg\" width=\"135\" height=\"115\"\/><\/p>\n<hr\/>\n<p>\u041e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u043e\u0442 \u043d\u0443\u043b\u044f <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\lfloor x \\rceil\" alt=\"\\lfloor x \\rceil\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3f4\/daa\/f89\/3f4daaf89e1433924fd43c3e697d57f9.svg\" width=\"29\" height=\"22\"\/><br \/>\u041a\u043e\u0433\u0434\u0430 \u0447\u0438\u0441\u043b\u043e \u043e\u043a\u0440\u0443\u0433\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u0438 \u043e\u0442 \u043d\u0443\u043b\u044f. \u0418\u043b\u0438, \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u043e\u043a\u0440\u0443\u0433\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u043d\u0438\u0437, \u0430 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u0432\u0435\u0440\u0445.<\/p>\n<p>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"y=\\operatorname {round\\_inf} (x) =\\lfloor x \\rceil =\\operatorname {sign}(x)\\left\\lceil \\left|x\\right|\\right\\rceil =-\\operatorname {sign}(x)\\left\\lfloor -\\left|x\\right|\\right\\rfloor =\\begin{cases}\\left\\lceil x\\right\\rceil &amp;x\\geq 0\\\\[5mu]\\left\\lfloor x\\right\\rfloor &amp;x&lt;0\\end{cases}\" alt=\"y=\\operatorname {round\\_inf} (x) =\\lfloor x \\rceil =\\operatorname {sign}(x)\\left\\lceil \\left|x\\right|\\right\\rceil =-\\operatorname {sign}(x)\\left\\lfloor -\\left|x\\right|\\right\\rfloor =\\begin{cases}\\left\\lceil x\\right\\rceil &amp;x\\geq 0\\\\[5mu]\\left\\lfloor x\\right\\rfloor &amp;x&lt;0\\end{cases}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ad2\/77c\/8ce\/ad277c8ce6d454346ccfa2018d4a321b.svg\" width=\"800\" height=\"66\"\/><\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\displaylines{\\lfloor +23.8 \\rceil = +24 \\\\\\lfloor +23.2 \\rceil = +24 \\\\\\lfloor -23.8 \\rceil = -24 \\\\\\lfloor -23.2 \\rceil = -24 \\\\}\" alt=\"\\displaylines{\\lfloor +23.8 \\rceil = +24 \\\\\\lfloor +23.2 \\rceil = +24 \\\\\\lfloor -23.8 \\rceil = -24 \\\\\\lfloor -23.2 \\rceil = -24 \\\\}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7fd\/c43\/09f\/7fdc4309ffc73e85dcfebb9400a437b9.svg\" width=\"135\" height=\"115\"\/><\/p>\n<hr\/>\n<p>\u0418 \u043a\u043e \u0432\u0441\u0435\u043c\u0443 \u043f\u0440\u043e\u0447\u0435\u043c\u0443, \u0434\u043b\u044f \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e (\u0415\u0432\u043a\u043b\u0438\u0434\u043e\u0432\u0430) \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441 \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u043c \u0442\u043e\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u0432\u0435\u0441\u0442\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0415\u0432\u043a\u043b\u0438\u0434\u043e\u0432\u043e \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"\\langle x \\rangle\" alt=\"\\langle x \\rangle\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f\/f1\/f18\/f18797cea40f0f7cd910e82bb0acb6ce.svg\" width=\"auto\" height=\"auto\"\/><br \/>\u041a\u043e\u0433\u0434\u0430 \u0447\u0438\u0441\u043b\u043e \u043e\u043a\u0440\u0443\u0433\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0437\u043d\u0430\u043a\u0430 \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f.<br \/>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"q=\\operatorname {sign}(b)\\left\\lfloor {\\frac {a}{\\left|b\\right|}}\\right\\rfloor =\\begin{cases}\\left\\lfloor {\\frac {a}{b}}\\right\\rfloor &amp;{\\text{if }}b&gt;0\\\\\\left\\lceil {\\frac {a}{b}}\\right\\rceil &amp;{\\text{if }}b&lt;0\\\\\\end{cases}\" alt=\"q=\\operatorname {sign}(b)\\left\\lfloor {\\frac {a}{\\left|b\\right|}}\\right\\rfloor =\\begin{cases}\\left\\lfloor {\\frac {a}{b}}\\right\\rfloor &amp;{\\text{if }}b&gt;0\\\\\\left\\lceil {\\frac {a}{b}}\\right\\rceil &amp;{\\text{if }}b&lt;0\\\\\\end{cases}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/de9\/b90\/b3a\/de9b90b3a22a71aa7b8cc4cc405840a0.svg\" width=\"383\" height=\"68\"\/><\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\displaylines{\\langle +53 \\; \/ +5 \\rangle = +10 \\\\\\langle +53 \\; \/ -5 \\rangle = -10 \\\\\\langle -53 \\; \/ +5 \\rangle = -11 \\\\\\langle -53 \\; \/ -5 \\rangle = +11 \\\\}\" alt=\"\\displaylines{\\langle +53 \\; \/ +5 \\rangle = +10 \\\\\\langle +53 \\; \/ -5 \\rangle = -10 \\\\\\langle -53 \\; \/ +5 \\rangle = -11 \\\\\\langle -53 \\; \/ -5 \\rangle = +11 \\\\}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a7b\/051\/605\/a7b051605a59026f4243fa2731c79c1d.svg\" width=\"167\" height=\"115\"\/><\/p>\n<hr\/>\n<h3>\u0412\u0437\u044f\u0442\u0438\u0435 \u043e\u0441\u0442\u0430\u0442\u043a\u0430<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u0433\u0440\u0443\u0431\u043e, \u0442\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0432\u0437\u044f\u0442\u0438\u044f \u043e\u0441\u0442\u0430\u0442\u043a\u0430 \u043d\u0435 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043c\u0435\u0442\u043e\u0434\u0430 \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0418 \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0439\u0442\u0438 \u043e\u0441\u0442\u0430\u0442\u043e\u043a, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0437 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"a=b \\times q + r = b \\times (a \\div b) + r\" alt=\"a=b \\times q + r = b \\times (a \\div b) + r\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8c6\/e94\/158\/8c6e9415840aa599a0808ed5249ef1ff.svg\" width=\"326\" height=\"28\"\/><\/p>\n<p>\u0432\u044b\u0432\u0435\u0441\u0442\u0438 <img decoding=\"async\" class=\"formula inline\" source=\"r\" alt=\"r\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4\/4b\/4b4\/4b43b0aee35624cd95b910189b3dc231.svg\" width=\"auto\" height=\"auto\"\/>,<br \/>\u0442\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"r = a - q \\times b = a - (a \\div b) \\times b\" alt=\"r = a - q \\times b = a - (a \\div b) \\times b\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/03e\/dae\/2e6\/03edae2e6b30845fb5441dca5f9a6a0d.svg\" width=\"328\" height=\"28\"\/><\/p>\n<h2>\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430<\/h2>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0432\u0441\u0451 \u0433\u043e\u0442\u043e\u0432\u043e, \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0438 \u043f\u043e\u043d\u044f\u0442\u044c, \u043f\u043e \u043a\u0430\u043a\u0438\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u0432 \u0432\u0430\u0448\u0435\u043c \u044f\u0437\u044b\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>\u0414\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0447\u0430\u0441\u0442\u043d\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"q = round\\_type(a \/ b)\" alt=\"q = round\\_type(a \/ b)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5b3\/c8f\/0db\/5b3c8f0db381addf29c5661eb96a05b1.svg\" width=\"221\" height=\"28\"\/><\/p>\n<p>\u0438 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043e\u0441\u0442\u0430\u0442\u043a\u0430 \u043e\u0442 \u0434\u0435\u043b\u0435\u043d\u0438\u044f:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"r = a - round\\_type(a \/ b) \\times b\" alt=\"r = a - round\\_type(a \/ b) \\times b\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/37d\/2e0\/a1a\/37d2e0a1a2c4f6cd2e8e23fe2782c226.svg\" width=\"304\" height=\"28\"\/><\/p>\n<p>\u0414\u043b\u044f \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0415\u0432\u043a\u043b\u0438\u0434\u0430:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"q = sign(b) \\times round\\_dn(a \/ abs(b))\" alt=\"q = sign(b) \\times round\\_dn(a \/ abs(b))\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e83\/488\/eb5\/e83488eb5f2f18db8aef4cdff15b9268.svg\" width=\"364\" height=\"28\"\/><\/p>\n<p>\u0438<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"r = a -  round\\_dn(a \/ abs(b)) \\times abs(b)\" alt=\"r = a -  round\\_dn(a \/ abs(b)) \\times abs(b)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c59\/3cd\/e36\/c593cde36eee91432ac0082d1d28f2e6.svg\" width=\"395\" height=\"28\"\/><\/p>\n<p>\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0438\u0441\u043b\u0430 <img decoding=\"async\" class=\"formula inline\" source=\"a\" alt=\"a\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/0c\/0cc\/0cc175b9c0f1b6a831c399e269772661.svg\" width=\"auto\" height=\"auto\"\/> = 53, <img decoding=\"async\" class=\"formula inline\" source=\"b\" alt=\"b\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9\/92\/92e\/92eb5ffee6ae2fec3ad71c777531578f.svg\" width=\"auto\" height=\"auto\"\/> = 5, \u0447\u0442\u043e \u043f\u0440\u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0434\u0430\u0435\u0442 <img decoding=\"async\" class=\"formula inline\" source=\"c\" alt=\"c\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4\/4a\/4a8\/4a8a08f09d37b73795649038408b5f33.svg\" width=\"auto\" height=\"auto\"\/> = 10,6.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0435\u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0447\u0430\u0441\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p>a<\/p>\n<\/th>\n<th>\n<p>b<\/p>\n<\/th>\n<th data-colwidth=\"50\" width=\"50\">\n<p>\u0441<\/p>\n<\/th>\n<th>\n<p>div_euclid<\/p>\n<\/th>\n<th>\n<p>div_zero<\/p>\n<\/th>\n<th>\n<p>div_inf<\/p>\n<\/th>\n<th>\n<p>div_dn<\/p>\n<\/th>\n<th data-colwidth=\"87\" width=\"87\">\n<p>div_up<\/p>\n<\/th>\n<th>\n<p>Sign<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">+53<\/p>\n<\/td>\n<td>\n<p align=\"left\">+5<\/p>\n<\/td>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">+10,6<\/p>\n<\/td>\n<td>\n<p align=\"left\">+10<\/p>\n<\/td>\n<td>\n<p align=\"left\">+10<\/p>\n<\/td>\n<td>\n<p align=\"left\">+11<\/p>\n<\/td>\n<td>\n<p align=\"left\">+10<\/p>\n<\/td>\n<td data-colwidth=\"87\" width=\"87\">\n<p align=\"left\">+11<\/p>\n<\/td>\n<td>\n<p align=\"left\">+<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">+53<\/p>\n<\/td>\n<td>\n<p align=\"left\">-5<\/p>\n<\/td>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">-10,6<\/p>\n<\/td>\n<td>\n<p align=\"left\">-10<\/p>\n<\/td>\n<td>\n<p align=\"left\">-10<\/p>\n<\/td>\n<td>\n<p align=\"left\">-11<\/p>\n<\/td>\n<td>\n<p align=\"left\">-11<\/p>\n<\/td>\n<td data-colwidth=\"87\" width=\"87\">\n<p align=\"left\">-10<\/p>\n<\/td>\n<td>\n<p align=\"left\">&#8212;<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">-53<\/p>\n<\/td>\n<td>\n<p align=\"left\">+5<\/p>\n<\/td>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">-10,6<\/p>\n<\/td>\n<td>\n<p align=\"left\">-11<\/p>\n<\/td>\n<td>\n<p align=\"left\">-10<\/p>\n<\/td>\n<td>\n<p align=\"left\">-11<\/p>\n<\/td>\n<td>\n<p align=\"left\">-11<\/p>\n<\/td>\n<td data-colwidth=\"87\" width=\"87\">\n<p align=\"left\">-10<\/p>\n<\/td>\n<td>\n<p align=\"left\">&#8212;<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">-53<\/p>\n<\/td>\n<td>\n<p align=\"left\">-5<\/p>\n<\/td>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">+10,6<\/p>\n<\/td>\n<td>\n<p align=\"left\">+11<\/p>\n<\/td>\n<td>\n<p align=\"left\">+10<\/p>\n<\/td>\n<td>\n<p align=\"left\">+11<\/p>\n<\/td>\n<td>\n<p align=\"left\">+10<\/p>\n<\/td>\n<td data-colwidth=\"87\" width=\"87\">\n<p align=\"left\">+11<\/p>\n<\/td>\n<td>\n<p align=\"left\">+<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u0437\u043d\u0430\u043a \u0443 \u043d\u0435\u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0447\u0430\u0441\u0442\u043d\u043e\u0433\u043e \u0432\u043e \u0432\u0441\u0435\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442.<\/p>\n<p>\u0414\u043b\u044f \u043e\u0441\u0442\u0430\u0442\u043a\u0430 \u043e\u0442 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th data-colwidth=\"50\" width=\"50\">\n<p>a<\/p>\n<\/th>\n<th data-colwidth=\"50\" width=\"50\">\n<p>b<\/p>\n<\/th>\n<th data-colwidth=\"63\" width=\"63\">\n<p>\u0441<\/p>\n<\/th>\n<th data-colwidth=\"91\" width=\"91\">\n<p>mod_euclid<\/p>\n<\/th>\n<th data-colwidth=\"123\" width=\"123\">\n<p>mod_zero<\/p>\n<\/th>\n<th data-colwidth=\"112\" width=\"112\">\n<p>mod_inf<\/p>\n<\/th>\n<th>\n<p>mod_dn<\/p>\n<\/th>\n<th>\n<p>mod_up<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">+53<\/p>\n<\/td>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">+5<\/p>\n<\/td>\n<td data-colwidth=\"63\" width=\"63\">\n<p align=\"left\">+10,6<\/p>\n<\/td>\n<td data-colwidth=\"91\" width=\"91\">\n<p align=\"left\">+3<\/p>\n<\/td>\n<td data-colwidth=\"123\" width=\"123\">\n<p align=\"left\">+3<\/p>\n<\/td>\n<td data-colwidth=\"112\" width=\"112\">\n<p align=\"left\">-2<\/p>\n<\/td>\n<td>\n<p align=\"left\">+3<\/p>\n<\/td>\n<td>\n<p align=\"left\">-2<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">+53<\/p>\n<\/td>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">-5<\/p>\n<\/td>\n<td data-colwidth=\"63\" width=\"63\">\n<p align=\"left\">-10,6<\/p>\n<\/td>\n<td data-colwidth=\"91\" width=\"91\">\n<p align=\"left\">+3<\/p>\n<\/td>\n<td data-colwidth=\"123\" width=\"123\">\n<p align=\"left\">+3<\/p>\n<\/td>\n<td data-colwidth=\"112\" width=\"112\">\n<p align=\"left\">-2<\/p>\n<\/td>\n<td>\n<p align=\"left\">-2<\/p>\n<\/td>\n<td>\n<p align=\"left\">+3<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">-53<\/p>\n<\/td>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">+5<\/p>\n<\/td>\n<td data-colwidth=\"63\" width=\"63\">\n<p align=\"left\">-10,6<\/p>\n<\/td>\n<td data-colwidth=\"91\" width=\"91\">\n<p align=\"left\">+2<\/p>\n<\/td>\n<td data-colwidth=\"123\" width=\"123\">\n<p align=\"left\">-3<\/p>\n<\/td>\n<td data-colwidth=\"112\" width=\"112\">\n<p align=\"left\">+2<\/p>\n<\/td>\n<td>\n<p align=\"left\">+2<\/p>\n<\/td>\n<td>\n<p align=\"left\">-3<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">-53<\/p>\n<\/td>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">-5<\/p>\n<\/td>\n<td data-colwidth=\"63\" width=\"63\">\n<p align=\"left\">+10,6<\/p>\n<\/td>\n<td data-colwidth=\"91\" width=\"91\">\n<p align=\"left\">+2<\/p>\n<\/td>\n<td data-colwidth=\"123\" width=\"123\">\n<p align=\"left\">-3<\/p>\n<\/td>\n<td data-colwidth=\"112\" width=\"112\">\n<p align=\"left\">+2<\/p>\n<\/td>\n<td>\n<p align=\"left\">-3<\/p>\n<\/td>\n<td>\n<p align=\"left\">+2<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u0437\u043d\u0430\u043a \u0443 \u043e\u0441\u0442\u0430\u0442\u043a\u0430 \u043e\u0442 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043d\u0435 \u0432\u043e \u0432\u0441\u0435\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442.<\/p>\n<p>\u0421\u0432\u0435\u0434\u0435\u043c \u0432\u0441\u0435 \u0432 \u0435\u0434\u0438\u043d\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th data-colwidth=\"75\" width=\"75\">\n<\/th>\n<th data-colwidth=\"57\" width=\"57\">\n<p>Sa<\/p>\n<\/th>\n<th data-colwidth=\"59\" width=\"59\">\n<p>Sb<\/p>\n<\/th>\n<th data-colwidth=\"64\" width=\"64\">\n<p>Sq<\/p>\n<\/th>\n<th data-colwidth=\"64\" width=\"64\">\n<p>Sr<\/p>\n<\/th>\n<th>\n<p>Rules<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td data-colwidth=\"75\" width=\"75\">\n<p align=\"left\">euclid<\/p>\n<\/td>\n<td data-colwidth=\"57\" width=\"57\">\n<p align=\"left\">++&#8212;<\/p>\n<\/td>\n<td data-colwidth=\"59\" width=\"59\">\n<p align=\"left\">+-+-<\/p>\n<\/td>\n<td data-colwidth=\"64\" width=\"64\">\n<p align=\"left\">+&#8212;+<\/p>\n<\/td>\n<td data-colwidth=\"64\" width=\"64\">\n<p align=\"left\">++++<\/p>\n<\/td>\n<td>\n<p align=\"left\">sign(r) = +1<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"75\" width=\"75\">\n<p align=\"left\">zero<\/p>\n<\/td>\n<td data-colwidth=\"57\" width=\"57\">\n<p align=\"left\">++&#8212;<\/p>\n<\/td>\n<td data-colwidth=\"59\" width=\"59\">\n<p align=\"left\">+-+-<\/p>\n<\/td>\n<td data-colwidth=\"64\" width=\"64\">\n<p align=\"left\">+&#8212;+<\/p>\n<\/td>\n<td data-colwidth=\"64\" width=\"64\">\n<p align=\"left\">++&#8212;<\/p>\n<\/td>\n<td>\n<p align=\"left\">sign(r) = sign( a)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"75\" width=\"75\">\n<p align=\"left\">inf<\/p>\n<\/td>\n<td data-colwidth=\"57\" width=\"57\">\n<p align=\"left\">++&#8212;<\/p>\n<\/td>\n<td data-colwidth=\"59\" width=\"59\">\n<p align=\"left\">+-+-<\/p>\n<\/td>\n<td data-colwidth=\"64\" width=\"64\">\n<p align=\"left\">+&#8212;+<\/p>\n<\/td>\n<td data-colwidth=\"64\" width=\"64\">\n<p align=\"left\">&#8212;++<\/p>\n<\/td>\n<td>\n<p align=\"left\">sign(r) = sign(-a)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"75\" width=\"75\">\n<p align=\"left\">dn<\/p>\n<\/td>\n<td data-colwidth=\"57\" width=\"57\">\n<p align=\"left\">++&#8212;<\/p>\n<\/td>\n<td data-colwidth=\"59\" width=\"59\">\n<p align=\"left\">+-+-<\/p>\n<\/td>\n<td data-colwidth=\"64\" width=\"64\">\n<p align=\"left\">+&#8212;+<\/p>\n<\/td>\n<td data-colwidth=\"64\" width=\"64\">\n<p align=\"left\">+-+-<\/p>\n<\/td>\n<td>\n<p align=\"left\">sign(r) = sign( b)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"75\" width=\"75\">\n<p align=\"left\">up<\/p>\n<\/td>\n<td data-colwidth=\"57\" width=\"57\">\n<p align=\"left\">++&#8212;<\/p>\n<\/td>\n<td data-colwidth=\"59\" width=\"59\">\n<p align=\"left\">+-+-<\/p>\n<\/td>\n<td data-colwidth=\"64\" width=\"64\">\n<p align=\"left\">+&#8212;+<\/p>\n<\/td>\n<td data-colwidth=\"64\" width=\"64\">\n<p align=\"left\">-+-+<\/p>\n<\/td>\n<td>\n<p align=\"left\">sign(r) = sign(-b)<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0434\u043b\u044f zero \u0438 inf \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0442\u0430\u043a\u043e\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"(\u2212a) \\div b = \u2212(a \\div b)=a \\div (\u2212b)=-((-a) \\div (-b))\" alt=\"(\u2212a) \\div b = \u2212(a \\div b)=a \\div (\u2212b)=-((-a) \\div (-b))\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/180\/7b9\/58c\/1807b958c73a7d3c362c02b8af10d94f.svg\" width=\"542\" height=\"28\"\/><\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0435 \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u0435 \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u0435\u043b\u0435\u043d\u0438\u044f, \u0447\u0442\u043e \u0438 \u0432\u044b\u043d\u0435\u0441\u0435\u043d\u043e \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0441\u0442\u0430\u0442\u044c\u0438. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043c\u0430\u043b\u043e \u044f\u0437\u044b\u043a\u043e\u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442 \u0434\u0432\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 DivMod \u0438 QuotRem \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u043e\u0434\u043d\u0430\u043a\u043e \u043a\u0430\u043a\u0438\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c \u043f\u043e \u0442\u0438\u043f\u0443 \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u044f \u043e\u043d\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442, \u044f \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043d\u0435 \u0431\u0435\u0440\u0443\u0441\u044c.. <\/p>\n<p>\u0410 \u0435\u0441\u0442\u044c \u043b\u0438 \u0442\u0435, \u043a\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435? \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0442\u043e\u0447\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c div_mod_euclid. <\/p>\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u043d\u043e \u0438\u0437\u0431\u0435\u0433\u0430\u043b \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439, \u0441\u0442\u0430\u0440\u0430\u044f\u0441\u044c \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430, \u0447\u0442\u043e, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0442\u0435\u043c\u0435 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0435 \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/876990\/\"> https:\/\/habr.com\/ru\/articles\/876990\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u044f\u0441\u044c \u0441 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u043c \u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u0438 \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u043c \u043e\u0442 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u043e\u0439 \u043a\u0430\u043a \u0432 \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437.<\/p>\n<p>\u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043a\u0430\u0436\u0443\u0449\u0443\u044e\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0443 \u0438 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0441\u0442\u0430\u0442\u0435\u0439 \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443, \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043e\u0433\u0440\u043e\u043c\u043d\u0430\u044f \u043f\u0443\u0442\u0430\u043d\u0438\u0446\u0430. \u0412 \u0440\u0430\u0437\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u0430\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 (\u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u044d\u0442\u043e \u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u0433\u0434\u0430 \u0432 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u0445  \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f).<\/p>\n<p>\u0415\u0441\u0442\u044c \u0430\u043d\u0433\u043b\u043e\u044f\u0437\u044b\u0447\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043d\u0430 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Modulo\" rel=\"noopener noreferrer nofollow\">Wikipedia<\/a>, \u0441 \u0444\u043e\u0440\u043c\u0443\u043b\u0430\u043c\u0438, \u0433\u0440\u0430\u0444\u0438\u043a\u0430\u043c\u0438 \u0438 \u0434\u0430\u0436\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u0435\u0439 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0430 \u044d\u0442\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435. \u041e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e \u043d\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0442\u0435\u043c\u0435 \u0438 \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u043e\u0439 \u043d\u0435\u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0421\u0442\u0430\u0442\u044c\u044f \u043d\u0435 \u043f\u0440\u0435\u0442\u0435\u043d\u0434\u0443\u0435\u0442 \u043d\u0430 \u0441\u0440\u044b\u0432 \u043f\u043e\u043a\u0440\u043e\u0432\u043e\u0432, \u0430 \u0441\u043a\u043e\u0440\u0435\u0435 \u0441\u0442\u0440\u0435\u043c\u0438\u0442\u0441\u044f \u0431\u044b\u0442\u044c \u0443\u0434\u043e\u0431\u043d\u043e\u0439 \u0448\u043f\u0430\u0440\u0433\u0430\u043b\u043a\u043e\u0439. \u041b\u0438\u0441\u0442\u0438\u043d\u0433\u043e\u0432 \u043a\u043e\u0434\u0430 \u0438 \u0442\u043e\u0447\u043d\u044b\u0445 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e \u0432 \u0432\u0430\u0448\u0435\u043c \u044f\u0437\u044b\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435 \u0431\u0443\u0434\u0435\u0442, \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0435 \u0444\u043e\u0440\u043c\u0443\u043b\u044b.<\/p>\n<figure class=\"full-width\"><\/figure>\n<h2>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f<\/h2>\n<h3>\u0414\u0435\u043b\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u2013 \u043d\u0435\u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f.<\/p>\n<p>\u0412\u0441\u0435 \u0437\u043d\u0430\u044e\u0442, \u0447\u0442\u043e \u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430 \u043d\u043e\u043b\u044c \u043d\u0435\u043b\u044c\u0437\u044f (\u0431\u0435\u0437 \u043f\u0440\u0435\u0434\u0435\u043b\u0430), \u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0435 \u0442\u0435\u0440\u043f\u0438\u0442 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043e\u043f\u0435\u0440\u0430\u043d\u0434\u043e\u0432 (\u043d\u0435\u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u0438\u0432\u043d\u043e).<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0435\u0441\u043b\u0438 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0434\u0435\u043b\u0435\u043d\u0438\u0435, \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u0435\u0442 \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u043d\u044e\u0430\u043d\u0441, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0441\u0442\u0430\u0442\u043e\u043a \u043e\u0442 \u0434\u0435\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0442\u043e\u0438\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0434\u0435\u043b\u0435\u043d\u0438\u0435  \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c <strong>\u0432 \u043e\u0431\u0449\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435<\/strong> \u043f\u0440\u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435, \u0432 \u043e\u0441\u043e\u0431\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438 \u0446\u0435\u043b\u043e\u0435, \u043d\u043e \u044d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438, \u0447\u0442\u043e \u0434\u0435\u043b\u0438\u043c\u043e\u0435 \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c \u043d\u0430\u0446\u0435\u043b\u043e, \u0442\u043e \u0435\u0441\u0442\u044c \u0431\u0435\u0437 \u043e\u0441\u0442\u0430\u0442\u043a\u0430.<\/p>\n<p>\u041e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043c \u044d\u0442\u043e \u043a\u0430\u043a<\/p>\n<p>\u0433\u0434\u0435  \u2013 \u0434\u0435\u043b\u0438\u043c\u043e\u0435,  \u2013 \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c,  \u2013 \u0447\u0430\u0441\u0442\u043d\u043e\u0435.<\/p>\n<p>\u0412 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f, <strong>\u0432 \u043e\u0431\u0449\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435<\/strong>, \u0434\u043b\u044f <strong>\u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u0435\u043b\u0435\u043d\u0438\u044f<\/strong> \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0442\u0430\u043a\u0438\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f:<\/p>\n<p>\u0433\u0434\u0435<\/p>\n<p> \u2013 \u0434\u0435\u043b\u0438\u043c\u043e\u0435,<br \/> \u2013 \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c, \u043f\u0440\u0438\u0447\u0435\u043c ,<br \/> \u2013 \u043d\u0435\u043f\u043e\u043b\u043d\u043e\u0435 \u0447\u0430\u0441\u0442\u043d\u043e\u0435,<br \/> \u2013 \u043e\u0441\u0442\u0430\u0442\u043e\u043a \u043e\u0442 \u0434\u0435\u043b\u0435\u043d\u0438\u044f,<br \/>\u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438:<br \/>  \u2013 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0434\u0435\u043b\u0435\u043d\u0438\u0435,<br \/>  \u2013 \u0432\u0437\u044f\u0442\u0438\u0435 \u043e\u0441\u0442\u0430\u0442\u043a\u0430.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043a\u043e\u0440\u043e\u0442\u043a\u043e \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0440\u0435\u0437 \u043e\u043f\u0435\u0440\u0430\u043d\u0434\u044b, \u0442\u043e \u0434\u043b\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0438 \u0432\u0437\u044f\u0442\u0438\u044f \u043e\u0441\u0442\u0430\u0442\u043a\u0430 \u0434\u043e\u043b\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0434\u0430\u043d\u043d\u043e\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435:<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0434\u043b\u044f \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e (\u0415\u0432\u043a\u043b\u0438\u0434\u043e\u0432\u0430) \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441 \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u043c \u0432\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f:<\/p>\n<p>\u041a\u043e\u0442\u043e\u0440\u043e\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043d\u0430\u043c, \u0447\u0442\u043e \u043e\u0441\u0442\u0430\u0442\u043e\u043a \u043e\u0442 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0438 \u043d\u0435 \u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u043c \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c. \u0421\u043e\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0440\u0435\u0434\u043a\u043e, \u0430 \u043f\u043e\u0442\u043e\u043c\u0443 \u0438 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0443\u0442\u0430\u043d\u0438\u0446\u0430.<\/p>\n<h3>\u041e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0427\u0442\u043e\u0431\u044b \u043d\u0430\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u0437 \u0447\u0430\u0441\u0442\u043d\u043e\u0433\u043e \u2014 \u043d\u0435\u043f\u043e\u043b\u043d\u043e\u0435 \u0447\u0430\u0441\u0442\u043d\u043e\u0435, \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u043e\u043a\u0440\u0443\u0433\u043b\u0438\u0442\u044c, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u044d\u0442\u0438 \u0441\u0430\u043c\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u044f. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0438\u0445 \u0432\u0432\u0435\u0434\u0435\u043c.<\/p>\n<hr\/>\n<p>\u041e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u0432\u043d\u0438\u0437 <br \/>\u041a\u043e\u0433\u0434\u0430 \u0447\u0438\u0441\u043b\u043e \u043e\u043a\u0440\u0443\u0433\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u0438.<br \/>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435:<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b:<\/p>\n<hr\/>\n<p>\u041e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u0432\u0432\u0435\u0440\u0445 <br \/>\u041a\u043e\u0433\u0434\u0430 \u0447\u0438\u0441\u043b\u043e \u043e\u043a\u0440\u0443\u0433\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435:<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b:<\/p>\n<hr\/>\n<p>\u041e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u043a \u043d\u0443\u043b\u044e <br \/>\u041a\u043e\u0433\u0434\u0430 \u0447\u0438\u0441\u043b\u043e \u043e\u043a\u0440\u0443\u0433\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u043d\u0443\u043b\u044f. \u0418\u043b\u0438, \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u043e\u043a\u0440\u0443\u0433\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u0432\u0435\u0440\u0445, \u0430 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u043d\u0438\u0437.<br \/>\u0422\u0430\u043a\u0436\u0435 \u044d\u0442\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u043e\u0442\u0441\u0435\u0447\u0435\u043d\u0438\u0435\u043c \u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438.<\/p>\n<p>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435:<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b:<\/p>\n<hr\/>\n<p>\u041e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u043e\u0442 \u043d\u0443\u043b\u044f <br \/>\u041a\u043e\u0433\u0434\u0430 \u0447\u0438\u0441\u043b\u043e \u043e\u043a\u0440\u0443\u0433\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u0438 \u043e\u0442 \u043d\u0443\u043b\u044f. \u0418\u043b\u0438, \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u043e\u043a\u0440\u0443\u0433\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u043d\u0438\u0437, \u0430 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u0432\u0435\u0440\u0445.<\/p>\n<p>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435:<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b:<\/p>\n<hr\/>\n<p>\u0418 \u043a\u043e \u0432\u0441\u0435\u043c\u0443 \u043f\u0440\u043e\u0447\u0435\u043c\u0443, \u0434\u043b\u044f \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e (\u0415\u0432\u043a\u043b\u0438\u0434\u043e\u0432\u0430) \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441 \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u043c \u0442\u043e\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u0432\u0435\u0441\u0442\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0415\u0432\u043a\u043b\u0438\u0434\u043e\u0432\u043e \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 <br \/>\u041a\u043e\u0433\u0434\u0430 \u0447\u0438\u0441\u043b\u043e \u043e\u043a\u0440\u0443\u0433\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0437\u043d\u0430\u043a\u0430 \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f.<br \/>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435:<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b:<\/p>\n<hr\/>\n<h3>\u0412\u0437\u044f\u0442\u0438\u0435 \u043e\u0441\u0442\u0430\u0442\u043a\u0430<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u0433\u0440\u0443\u0431\u043e, \u0442\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0432\u0437\u044f\u0442\u0438\u044f \u043e\u0441\u0442\u0430\u0442\u043a\u0430 \u043d\u0435 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043c\u0435\u0442\u043e\u0434\u0430 \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0418 \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0439\u0442\u0438 \u043e\u0441\u0442\u0430\u0442\u043e\u043a, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0437 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f<\/p>\n<p>\u0432\u044b\u0432\u0435\u0441\u0442\u0438 ,<br \/>\u0442\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c<\/p>\n<h2>\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430<\/h2>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0432\u0441\u0451 \u0433\u043e\u0442\u043e\u0432\u043e, \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0438 \u043f\u043e\u043d\u044f\u0442\u044c, \u043f\u043e \u043a\u0430\u043a\u0438\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u0432 \u0432\u0430\u0448\u0435\u043c \u044f\u0437\u044b\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>\u0414\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0447\u0430\u0441\u0442\u043d\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c:<\/p>\n<p>\u0438 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043e\u0441\u0442\u0430\u0442\u043a\u0430 \u043e\u0442 \u0434\u0435\u043b\u0435\u043d\u0438\u044f:<\/p>\n<p>\u0414\u043b\u044f \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0415\u0432\u043a\u043b\u0438\u0434\u0430:<\/p>\n<p>\u0438<\/p>\n<p>\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0438\u0441\u043b\u0430  = 53,  = 5, \u0447\u0442\u043e \u043f\u0440\u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0434\u0430\u0435\u0442  = 10,6.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0435\u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0447\u0430\u0441\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p>a<\/p>\n<\/th>\n<th>\n<p>b<\/p>\n<\/th>\n<th data-colwidth=\"50\" width=\"50\">\n<p>\u0441<\/p>\n<\/th>\n<th>\n<p>div_euclid<\/p>\n<\/th>\n<th>\n<p>div_zero<\/p>\n<\/th>\n<th>\n<p>div_inf<\/p>\n<\/th>\n<th>\n<p>div_dn<\/p>\n<\/th>\n<th data-colwidth=\"87\" width=\"87\">\n<p>div_up<\/p>\n<\/th>\n<th>\n<p>Sign<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">+53<\/p>\n<\/td>\n<td>\n<p align=\"left\">+5<\/p>\n<\/td>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">+10,6<\/p>\n<\/td>\n<td>\n<p align=\"left\">+10<\/p>\n<\/td>\n<td>\n<p align=\"left\">+10<\/p>\n<\/td>\n<td>\n<p align=\"left\">+11<\/p>\n<\/td>\n<td>\n<p align=\"left\">+10<\/p>\n<\/td>\n<td data-colwidth=\"87\" width=\"87\">\n<p align=\"left\">+11<\/p>\n<\/td>\n<td>\n<p align=\"left\">+<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">+53<\/p>\n<\/td>\n<td>\n<p align=\"left\">-5<\/p>\n<\/td>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">-10,6<\/p>\n<\/td>\n<td>\n<p align=\"left\">-10<\/p>\n<\/td>\n<td>\n<p align=\"left\">-10<\/p>\n<\/td>\n<td>\n<p align=\"left\">-11<\/p>\n<\/td>\n<td>\n<p align=\"left\">-11<\/p>\n<\/td>\n<td data-colwidth=\"87\" width=\"87\">\n<p align=\"left\">-10<\/p>\n<\/td>\n<td>\n<p align=\"left\">&#8212;<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">-53<\/p>\n<\/td>\n<td>\n<p align=\"left\">+5<\/p>\n<\/td>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">-10,6<\/p>\n<\/td>\n<td>\n<p align=\"left\">-11<\/p>\n<\/td>\n<td>\n<p align=\"left\">-10<\/p>\n<\/td>\n<td>\n<p align=\"left\">-11<\/p>\n<\/td>\n<td>\n<p align=\"left\">-11<\/p>\n<\/td>\n<td data-colwidth=\"87\" width=\"87\">\n<p align=\"left\">-10<\/p>\n<\/td>\n<td>\n<p align=\"left\">&#8212;<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">-53<\/p>\n<\/td>\n<td>\n<p align=\"left\">-5<\/p>\n<\/td>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">+10,6<\/p>\n<\/td>\n<td>\n<p align=\"left\">+11<\/p>\n<\/td>\n<td>\n<p align=\"left\">+10<\/p>\n<\/td>\n<td>\n<p align=\"left\">+11<\/p>\n<\/td>\n<td>\n<p align=\"left\">+10<\/p>\n<\/td>\n<td data-colwidth=\"87\" width=\"87\">\n<p align=\"left\">+11<\/p>\n<\/td>\n<td>\n<p align=\"left\">+<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u0437\u043d\u0430\u043a \u0443 \u043d\u0435\u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0447\u0430\u0441\u0442\u043d\u043e\u0433\u043e \u0432\u043e \u0432\u0441\u0435\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442.<\/p>\n<p>\u0414\u043b\u044f \u043e\u0441\u0442\u0430\u0442\u043a\u0430 \u043e\u0442 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th data-colwidth=\"50\" width=\"50\">\n<p>a<\/p>\n<\/th>\n<th data-colwidth=\"50\" width=\"50\">\n<p>b<\/p>\n<\/th>\n<th data-colwidth=\"63\" width=\"63\">\n<p>\u0441<\/p>\n<\/th>\n<th data-colwidth=\"91\" width=\"91\">\n<p>mod_euclid<\/p>\n<\/th>\n<th data-colwidth=\"123\" width=\"123\">\n<p>mod_zero<\/p>\n<\/th>\n<th data-colwidth=\"112\" width=\"112\">\n<p>mod_inf<\/p>\n<\/th>\n<th>\n<p>mod_dn<\/p>\n<\/th>\n<th>\n<p>mod_up<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">+53<\/p>\n<\/td>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">+5<\/p>\n<\/td>\n<td data-colwidth=\"63\" width=\"63\">\n<p align=\"left\">+10,6<\/p>\n<\/td>\n<td data-colwidth=\"91\" width=\"91\">\n<p align=\"left\">+3<\/p>\n<\/td>\n<td data-colwidth=\"123\" width=\"123\">\n<p align=\"left\">+3<\/p>\n<\/td>\n<td data-colwidth=\"112\" width=\"112\">\n<p align=\"left\">-2<\/p>\n<\/td>\n<td>\n<p align=\"left\">+3<\/p>\n<\/td>\n<td>\n<p align=\"left\">-2<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">+53<\/p>\n<\/td>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">-5<\/p>\n<\/td>\n<td data-colwidth=\"63\" width=\"63\">\n<p align=\"left\">-10,6<\/p>\n<\/td>\n<td data-colwidth=\"91\" width=\"91\">\n<p align=\"left\">+3<\/p>\n<\/td>\n<td data-colwidth=\"123\" width=\"123\">\n<p align=\"left\">+3<\/p>\n<\/td>\n<td data-colwidth=\"112\" width=\"112\">\n<p align=\"left\">-2<\/p>\n<\/td>\n<td>\n<p align=\"left\">-2<\/p>\n<\/td>\n<td>\n<p align=\"left\">+3<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">-53<\/p>\n<\/td>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">+5<\/p>\n<\/td>\n<td data-colwidth=\"63\" width=\"63\">\n<p align=\"left\">-10,6<\/p>\n<\/td>\n<td data-colwidth=\"91\" width=\"91\">\n<p align=\"left\">+2<\/p>\n<\/td>\n<td data-colwidth=\"123\" width=\"123\">\n<p align=\"left\">-3<\/p>\n<\/td>\n<td data-colwidth=\"112\" width=\"112\">\n<p align=\"left\">+2<\/p>\n<\/td>\n<td>\n<p align=\"left\">+2<\/p>\n<\/td>\n<td>\n<p align=\"left\">-3<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">-53<\/p>\n<\/td>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">-5<\/p>\n<\/td>\n<td data-colwidth=\"63\" width=\"63\">\n<p align=\"left\">+10,6<\/p>\n<\/td>\n<td data-colwidth=\"91\" width=\"91\">\n<p align=\"left\">+2<\/p>\n<\/td>\n<td data-colwidth=\"123\" width=\"123\">\n<p align=\"left\">-3<\/p>\n<\/td>\n<td data-colwidth=\"112\" width=\"112\">\n<p align=\"left\">+2<\/p>\n<\/td>\n<td>\n<p align=\"left\">-3<\/p>\n<\/td>\n<td>\n<p align=\"left\">+2<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u0437\u043d\u0430\u043a \u0443 \u043e\u0441\u0442\u0430\u0442\u043a\u0430 \u043e\u0442 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043d\u0435 \u0432\u043e \u0432\u0441\u0435\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442.<\/p>\n<p>\u0421\u0432\u0435\u0434\u0435\u043c \u0432\u0441\u0435 \u0432 \u0435\u0434\u0438\u043d\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th data-colwidth=\"75\" width=\"75\">\n<\/th>\n<th data-colwidth=\"57\" width=\"57\">\n<p>Sa<\/p>\n<\/th>\n<th data-colwidth=\"59\" width=\"59\">\n<p>Sb<\/p>\n<\/th>\n<th data-colwidth=\"64\" width=\"64\">\n<p>Sq<\/p>\n<\/th>\n<th data-colwidth=\"64\" width=\"64\">\n<p>Sr<\/p>\n<\/th>\n<th>\n<p>Rules<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td data-colwidth=\"75\" width=\"75\">\n<p align=\"left\">euclid<\/p>\n<\/td>\n<td data-colwidth=\"57\" width=\"57\">\n<p align=\"left\">++&#8212;<\/p>\n<\/td>\n<td data-colwidth=\"59\" width=\"59\">\n<p align=\"left\">+-+-<\/p>\n<\/td>\n<td data-colwidth=\"64\" width=\"64\">\n<p align=\"left\">+&#8212;+<\/p>\n<\/td>\n<td data-colwidth=\"64\" width=\"64\">\n<p align=\"left\">++++<\/p>\n<\/td>\n<td>\n<p align=\"left\">sign(r) = +1<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"75\" width=\"75\">\n<p align=\"left\">zero<\/p>\n<\/td>\n<td data-colwidth=\"57\" width=\"57\">\n<p align=\"left\">++&#8212;<\/p>\n<\/td>\n<td data-colwidth=\"59\" width=\"59\">\n<p align=\"left\">+-+-<\/p>\n<\/td>\n<td data-colwidth=\"64\" width=\"64\">\n<p align=\"left\">+&#8212;+<\/p>\n<\/td>\n<td data-colwidth=\"64\" width=\"64\">\n<p align=\"left\">++&#8212;<\/p>\n<\/td>\n<td>\n<p align=\"left\">sign(r) = sign( a)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"75\" width=\"75\">\n<p align=\"left\">inf<\/p>\n<\/td>\n<td data-colwidth=\"57\" width=\"57\">\n<p align=\"left\">++&#8212;<\/p>\n<\/td>\n<td data-colwidth=\"59\" width=\"59\">\n<p align=\"left\">+-+-<\/p>\n<\/td>\n<td data-colwidth=\"64\" width=\"64\">\n<p align=\"left\">+&#8212;+<\/p>\n<\/td>\n<td data-colwidth=\"64\" width=\"64\">\n<p align=\"left\">&#8212;++<\/p>\n<\/td>\n<td>\n<p align=\"left\">sign(r) = sign(-a)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"75\" width=\"75\">\n<p align=\"left\">dn<\/p>\n<\/td>\n<td data-colwidth=\"57\" width=\"57\">\n<p align=\"left\">++&#8212;<\/p>\n<\/td>\n<td data-colwidth=\"59\" width=\"59\">\n<p align=\"left\">+-+-<\/p>\n<\/td>\n<td data-colwidth=\"64\" width=\"64\">\n<p align=\"left\">+&#8212;+<\/p>\n<\/td>\n<td data-colwidth=\"64\" width=\"64\">\n<p align=\"left\">+-+-<\/p>\n<\/td>\n<td>\n<p align=\"left\">sign(r) = sign( b)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"75\" width=\"75\">\n<p align=\"left\">up<\/p>\n<\/td>\n<td data-colwidth=\"57\" width=\"57\">\n<p align=\"left\">++&#8212;<\/p>\n<\/td>\n<td data-colwidth=\"59\" width=\"59\">\n<p align=\"left\">+-+-<\/p>\n<\/td>\n<td data-colwidth=\"64\" width=\"64\">\n<p align=\"left\">+&#8212;+<\/p>\n<\/td>\n<td data-colwidth=\"64\" width=\"64\">\n<p align=\"left\">-+-+<\/p>\n<\/td>\n<td>\n<p align=\"left\">sign(r) = sign(-b)<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0434\u043b\u044f zero \u0438 inf \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0442\u0430\u043a\u043e\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435<\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0435 \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u0435 \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u0435\u043b\u0435\u043d\u0438\u044f, \u0447\u0442\u043e \u0438 \u0432\u044b\u043d\u0435\u0441\u0435\u043d\u043e \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0441\u0442\u0430\u0442\u044c\u0438. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043c\u0430\u043b\u043e \u044f\u0437\u044b\u043a\u043e\u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442 \u0434\u0432\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 DivMod \u0438 QuotRem \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u043e\u0434\u043d\u0430\u043a\u043e \u043a\u0430\u043a\u0438\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c \u043f\u043e \u0442\u0438\u043f\u0443 \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u044f \u043e\u043d\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442, \u044f \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043d\u0435 \u0431\u0435\u0440\u0443\u0441\u044c.. <\/p>\n<p>\u0410 \u0435\u0441\u0442\u044c \u043b\u0438 \u0442\u0435, \u043a\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435? \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0442\u043e\u0447\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c div_mod_euclid. <\/p>\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u043d\u043e \u0438\u0437\u0431\u0435\u0433\u0430\u043b \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439, \u0441\u0442\u0430\u0440\u0430\u044f\u0441\u044c \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430, \u0447\u0442\u043e, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0442\u0435\u043c\u0435 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0435 \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/876990\/\"> https:\/\/habr.com\/ru\/articles\/876990\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-446291","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/446291","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=446291"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/446291\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=446291"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=446291"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=446291"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}