{"id":356266,"date":"2024-05-20T23:25:57","date_gmt":"2024-05-20T23:25:57","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=356266"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-05-20T23:25:57","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=356266","title":{"rendered":"<span>\u0412\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u043b\u043d\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<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/qz\/0w\/2d\/qz0w2dj6ljprbp_hrxo734-9nsw.png\" width=\"502\" height=\"426\" data-src=\"https:\/\/habrastorage.org\/webt\/qz\/0w\/2d\/qz0w2dj6ljprbp_hrxo734-9nsw.png\"\/><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0435\u0435, \u0442\u043e <a href=\"https:\/\/en.wikipedia.org\/wiki\/Functional_completeness\" rel=\"noopener noreferrer nofollow\">\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u043b\u043d\u043e<\/a> \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u0435 \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u043e\u0439 \u043f\u043e <a href=\"https:\/\/en.wikipedia.org\/wiki\/IEEE_754\" rel=\"noopener noreferrer nofollow\">IEEE-754<\/a>\u00a0. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u0434\u0432\u043e\u0438\u0447\u043d\u0443\u044e \u0441\u0445\u0435\u043c\u0443 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u0438 \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0447\u0430\u0442\u044c \u0441\u043d\u0438\u0437\u0443. \u0426\u0438\u0442\u0430\u0442\u0430 \u0438\u0437 \u0440\u0430\u0437\u0434\u0435\u043b\u0430 6.3 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 IEEE 754-2019:<\/p>\n<blockquote>\n<p>6.3 \u0411\u0438\u0442 \u0437\u043d\u0430\u043a\u0430<\/p>\n<p>[\u2026] \u041a\u043e\u0433\u0434\u0430 \u043d\u0438 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043d\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f NaN, [\u2026]; \u0437\u043d\u0430\u043a \u0441\u0443\u043c\u043c\u044b \u0438\u043b\u0438 \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u0438 <em>x<\/em>\u2212<em>y<\/em>, \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u043e\u0439 \u043a\u0430\u043a \u0441\u0443\u043c\u043c\u0430 <em>x<\/em>+(\u2212<em>y<\/em>), \u0437\u043d\u0430\u043a\u043e\u043c \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c \u043e\u0442 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0445; [\u2026]. \u042d\u0442\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f, \u0434\u0430\u0436\u0435 \u043a\u043e\u0433\u0434\u0430 \u043e\u043f\u0435\u0440\u0430\u043d\u0434\u044b \u0438\u043b\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0440\u0430\u0432\u043d\u044b \u043d\u0443\u043b\u044e \u0438\u043b\u0438 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0441\u0443\u043c\u043c\u0430 \u0434\u0432\u0443\u0445 \u043e\u043f\u0435\u0440\u0430\u043d\u0434\u043e\u0432 \u0441 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u043a\u0430\u043c\u0438 (\u0438\u043b\u0438 \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u044c \u0434\u0432\u0443\u0445 \u043e\u043f\u0435\u0440\u0430\u043d\u0434\u043e\u0432 \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c\u0438 \u0437\u043d\u0430\u043a\u0430\u043c\u0438) \u0440\u0430\u0432\u043d\u0430 \u043d\u0443\u043b\u044e, \u0437\u043d\u0430\u043a \u044d\u0442\u043e\u0439 \u0441\u0443\u043c\u043c\u044b (\u0438\u043b\u0438 \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u0438) \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c +0\u00a0\u043f\u0440\u0438 \u0432\u0441\u0435\u0445 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u0445 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u044f, \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c <code>roundTowardNegative<\/code>; \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0435 \u0437\u043d\u0430\u043a \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0441\u0443\u043c\u043c\u044b (\u0438\u043b\u0438 \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u0438) \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u22120.<\/p>\n<\/blockquote>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u044d\u0442\u043e.<\/p>\n<ol>\n<li>\n<p>\u0412\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u0435 <em>x<\/em>\u2212<em>y<\/em>\u00a0\u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0441\u0443\u043c\u043c\u0430 <em>x<\/em>+(\u2212<em>y<\/em>).<\/p>\n<\/li>\n<li>\n<p>\u041d\u043e\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0437\u043d\u0430\u043a,\u00a0\u22120\u00a0\u0438 0\u00a0\u2014 \u044d\u0442\u043e \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 (\u0445\u043e\u0442\u044f \u043f\u0440\u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>==<\/code> \u043e\u043d\u0438 \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u0440\u0430\u0432\u043d\u044b\u043c\u0438).<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u043e\u0431\u0430 \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0445 \u0438\u043c\u0435\u044e\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0437\u043d\u0430\u043a, \u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u043c\u0435\u0442\u044c \u044d\u0442\u043e\u0442 \u0437\u043d\u0430\u043a. \u041e\u0434\u043d\u0430\u043a\u043e \u0434\u043b\u044f <em>x<\/em>\u2212<em>y<\/em>\u00a0\u044d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 <em>x<\/em>\u00a0\u0438 <em>y<\/em>\u00a0\u0438\u043c\u0435\u044e\u0442 <em>\u0440\u0430\u0437\u043d\u044b\u0435<\/em>\u00a0\u0437\u043d\u0430\u043a\u0438, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u043c\u0435\u0442\u044c \u0437\u043d\u0430\u043a <em>x<\/em>.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 <em>x<\/em>\u00a0\u0438 <em>y<\/em>\u00a0\u0438\u043c\u0435\u044e\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0437\u043d\u0430\u043a, \u0430 <em>x<\/em>\u2212<em>y<\/em>\u00a0\u0440\u0430\u0432\u043d\u043e \u043d\u0443\u043b\u044e, \u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 +0\u00a0\u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0440\u0435\u0436\u0438\u043c\u043e\u0432 \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u044f, \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c <code>roundTowardNegative<\/code>, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u22120.<\/p>\n<\/li>\n<\/ol>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0440\u0435\u0436\u0438\u043c \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u044f <code>roundTiesToEven<\/code>, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u043d. \u041e\u0434\u043d\u0430\u043a\u043e \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0434\u0430\u0436\u0435 \u0434\u043b\u044f <code>roundTowardNegative<\/code>.<\/p>\n<h3>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u0438\u0441\u0442\u0438\u043d\u043d\u043e\u0441\u0442\u0438<\/h3>\n<p>\u0422\u0430\u043a \u0447\u0442\u043e \u0436\u0435 \u044d\u0442\u043e \u0434\u0430\u0451\u0442 \u043d\u0430\u043c \u043f\u0440\u0438 \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u0438 \u043d\u0443\u043b\u0435\u0439?<\/p>\n<pre><code class=\"python\">-0 - -0 = +0  # \u041e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0437\u043d\u0430\u043a, \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c +0. -0 - +0 = -0  # \u0420\u0430\u0437\u043d\u044b\u0435 \u0437\u043d\u0430\u043a\u0438, \u0437\u043d\u0430\u043a \u043e\u0442 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430. +0 - -0 = +0  # \u0420\u0430\u0437\u043d\u044b\u0435 \u0437\u043d\u0430\u043a\u0438, \u0437\u043d\u0430\u043a \u043e\u0442 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430. +0 - +0 = +0  # \u041e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0437\u043d\u0430\u043a, \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c +0.<\/code><\/pre>\n<p>\u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u2026 \u0410 \u0435\u0441\u043b\u0438 \u043c\u044b \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043c \u22120\u00a0\u043a\u0430\u043a false, \u0430 +0\u00a0\u043a\u0430\u043a true?<\/p>\n<pre><code class=\"python\">A B | O ----+-- 0 0 | 1 0 1 | 0 1 0 | 1 1 1 | 1<\/code><\/pre>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0430\u044f\u0441\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0438\u0441\u0442\u0438\u043d\u043d\u043e\u0441\u0442\u0438 \u0431\u0443\u0434\u0435\u0442 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043e\u043c <em>A<\/em>\u2228\u00ac<em>B<\/em>, \u0438\u043b\u0438 <em>B<\/em>\u2192<em>A<\/em>\u00a0(\u0442\u0430\u043a\u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0433\u043e \u043a\u0430\u043a \u0432\u0435\u043d\u0442\u0438\u043b\u044c \u00ab\u0438\u043c\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u044f\u00bb (<a href=\"https:\/\/en.wikipedia.org\/wiki\/IMPLY_gate\" rel=\"noopener noreferrer nofollow\">IMPLY<\/a>), \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438). \u041e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043d\u0430\u0448\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0438\u0441\u0442\u0438\u043d\u043d\u043e\u0441\u0442\u0438 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Functional_completeness\" rel=\"noopener noreferrer nofollow\">\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u043b\u043d\u0430<\/a>, \u0442\u043e \u0435\u0441\u0442\u044c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u044d\u0442\u043e\u0433\u043e \u0432\u0435\u043d\u0442\u0438\u043b\u044f \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0435 \u0441\u0445\u0435\u043c\u044b.<\/p>\n<h3>\u0421\u0445\u0435\u043c\u044b \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u044f<\/h3>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0434\u0435\u043c\u043e \u043d\u0430 Python. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043c \u0438\u0445 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0439 \u0432\u044b\u0432\u043e\u0434:<\/p>\n<p><em>\u0425\u043e\u0442\u044f \u044d\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438,\u00a0\u043f\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 \u0432 IEEE 754 +0\u00a0\u0438 \u22120\u00a0\u043f\u0440\u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u0440\u0430\u0432\u043d\u044b\u043c\u0438. \u0422\u043e \u0435\u0441\u0442\u044c \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0442\u044c \u0438\u0445, \u043d\u0430\u043c \u043f\u0435\u0440\u0435\u0434 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435\u043c \u0441 0 \u043d\u0443\u0436\u043d\u043e \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0437\u043d\u0430\u043a.<\/em><\/p>\n<pre><code class=\"python\">import math  f_false = -0.0 f_true = 0.0 f_repr = lambda x: True if math.copysign(1, x) > 0 else False<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432\u0435\u043d\u0442\u0438\u043b\u044c NOT, \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432\u0448\u0438\u0441\u044c \u0442\u0435\u043c, \u0447\u0442\u043e \u22120\u2212<em>x<\/em>\u00a0\u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442 \u0437\u043d\u0430\u043a \u043d\u0443\u043b\u0435\u0432\u043e\u0433\u043e <em>x<\/em>:<\/p>\n<pre><code class=\"python\">f_not = lambda x: f_false - x<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u044d\u0442\u043e:<\/p>\n<pre><code class=\"python\">>>> f_repr(f_not(f_false)) True >>> f_repr(f_not(f_true)) False<\/code><\/pre>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e! \u041c\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432\u0435\u043d\u0442\u0438\u043b\u044c OR, \u043e\u0431\u0440\u0430\u0442\u0438\u0432 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043c\u044b \u043f\u0435\u0440\u0435\u0434 \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u0435\u043c \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u043c \u0437\u043d\u0430\u043a \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430, \u0442\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c +0\u00a0(true), \u0435\u0441\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u0430 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u043d\u0435 \u0440\u0430\u0432\u043d\u044b \u22120\u00a0(false):<\/p>\n<pre><code class=\"python\">f_or = lambda a, b: a - f_not(b)<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u044d\u0442\u043e:<\/p>\n<pre><code class=\"python\">>>> f_repr(f_or(f_false, f_false)) False >>> f_repr(f_or(f_true,  f_false)) True >>> f_repr(f_or(f_false, f_true)) True >>> f_repr(f_or(f_true, f_true)) True<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c OR \u0438 NOT, \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u0435\u043d\u0442\u0438\u043b\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"python\">f_and = lambda a, b: f_not(f_or(f_not(a), f_not(b))) f_xor = lambda a, b: f_or(f_and(f_not(a), b), f_and(a, f_not(b)))<\/code><\/pre>\n<pre><code class=\"python\">>>> f_repr(f_and(f_false, f_false)) False >>> f_repr(f_and(f_true,  f_false)) False >>> f_repr(f_and(f_false, f_true)) False >>> f_repr(f_and(f_true, f_true)) True  >>> f_repr(f_xor(f_false, f_false)) False >>> f_repr(f_xor(f_true,  f_false)) True >>> f_repr(f_xor(f_false, f_true)) True >>> f_repr(f_xor(f_true, f_true)) False<\/code><\/pre>\n<h3>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0435 \u0446\u0435\u043b\u044b\u0435 \u0447\u0438\u0441\u043b\u0430<\/h3>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u044b \u0441\u043b\u044b\u0448\u0430\u043b\u0438 \u043e soft-float \u2014 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f\u0445 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u0438 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442: \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043e\u0434\u043d\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439. \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0435\u0451 \u043d\u0430 Rust, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u043d\u0430 \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u0434 \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u0435\u0433\u043e <s>\u0443\u0436\u0430\u0441\u043d\u043e\u0439 \u0442\u043e\u0440\u043c\u043e\u0437\u043d\u0443\u0442\u043e\u0441\u0442\u0438<\/s>\u00a0\u0432\u0435\u043b\u0438\u043a\u043e\u043b\u0435\u043f\u0438\u0438.<\/p>\n<pre><code class=\"rust\">type Bit = f32; const ZERO: Bit = -0.0; const ONE: Bit = 0.0;  fn not(x: Bit) -> Bit { ZERO - x } fn or(a: Bit, b: Bit) -> Bit { a - not(b) } fn and(a: Bit, b: Bit) -> Bit { not(or(not(a), not(b))) } fn xor(a: Bit, b: Bit) -> Bit { or(and(not(a), b), and(a, not(b))) } fn adder(a: Bit, b: Bit, c: Bit) -> (Bit, Bit) {     let s = xor(xor(a, b), c);     let c = or(and(xor(a, b), c), and(a, b));     (s, c) }  type SoftU8 = [Bit; 8];  pub fn softu8_add(a: SoftU8, b: SoftU8) -> SoftU8 {     let (s0, c) = adder(a[0], b[0], ZERO);     let (s1, c) = adder(a[1], b[1], c);     let (s2, c) = adder(a[2], b[2], c);     let (s3, c) = adder(a[3], b[3], c);     let (s4, c) = adder(a[4], b[4], c);     let (s5, c) = adder(a[5], b[5], c);     let (s6, c) = adder(a[6], b[6], c);     let (s7, _) = adder(a[7], b[7], c);     [s0, s1, s2, s3, s4, s5, s6, s7] }  \/\/ \u0425\u043c? u8? \u0427\u0442\u043e \u044d\u0442\u043e? \u0422\u0441-\u0441-\u0441-\u0441.... pub fn to_softu8(x: u8) -> SoftU8 {     std::array::from_fn(|i| if (x >> i) &amp; 1 == 1 { ONE } else { ZERO }) }  pub fn from_softu8(x: SoftU8) -> u8 {     (0..8).filter(|i| x[*i].signum() > 0.0).map(|i| 1 &lt;&lt; i).sum() }  fn main() {     let a = to_softu8(23);     let b = to_softu8(19);     println!(\"{}\", from_softu8(softu8_add(a, b))); }<\/code><\/pre>\n<p>\u042d\u0442\u043e \u0443\u0436\u0430\u0441\u043d\u043e, \u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u0442 42. \u0418 \u0434\u043b\u044f \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u0432\u0443\u0445 8-\u0431\u0438\u0442\u043d\u044b\u0445 \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u043d\u0443\u0436\u043d\u043e <em>\u0432\u0441\u0435\u0433\u043e<\/em> \u2248120\u00a0\u043a\u043e\u043c\u0430\u043d\u0434 \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439:<\/p>\n<p><em>\u041d\u0430 x86-64 \u043d\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043e\u0442\u0440\u0438\u0446\u0430\u043d\u0438\u044f \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439, \u0432\u043c\u0435\u0441\u0442\u043e \u043d\u0435\u0451 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043f\u0440\u043e\u0441\u0442\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 XOR \u0441 \u043c\u0430\u0441\u043a\u043e\u0439, \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0438\u0439 \u0441\u0442\u0430\u0440\u0448\u0438\u0439 \u0431\u0438\u0442, \u0442\u043e \u0435\u0441\u0442\u044c \u0431\u0438\u0442 \u0437\u043d\u0430\u043a\u0430 \u0447\u0438\u0441\u043b\u0430 \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 IEEE-754.<\/em><\/p>\n<pre><code>example::softu8_add:         mov     rax, rdi         movups  xmm2, xmmword ptr [rsi]         movups  xmm0, xmmword ptr [rdx]         movaps  xmm3, xmm2         subps   xmm3, xmm0         movaps  xmm4, xmm0         subps   xmm4, xmm2         movaps  xmm1, xmmword ptr [rip + .LCPI0_0]         xorps   xmm4, xmm1         subps   xmm4, xmm3         xorps   xmm3, xmm3         subss   xmm3, xmm4         movaps  xmm6, xmm0         xorps   xmm6, xmm1         subss   xmm6, xmm2         xorps   xmm6, xmm1         subss   xmm6, xmm3         movaps  xmm3, xmm4         shufps  xmm3, xmm4, 85         movaps  xmm5, xmm6         subss   xmm5, xmm3         xorps   xmm5, xmm1         movaps  xmm10, xmm6         xorps   xmm10, xmm1         subss   xmm10, xmm3         movaps  xmm7, xmm0         shufps  xmm7, xmm0, 85         xorps   xmm7, xmm1         movaps  xmm3, xmm2         shufps  xmm3, xmm2, 85         subss   xmm7, xmm3         xorps   xmm7, xmm1         movaps  xmm8, xmm4         unpckhpd        xmm8, xmm4         movaps  xmm3, xmm0         unpckhpd        xmm3, xmm0         xorps   xmm3, xmm1         movaps  xmm9, xmm2         unpckhpd        xmm9, xmm2         subss   xmm3, xmm9         xorps   xmm3, xmm1         xorps   xmm11, xmm11         movaps  xmm9, xmm4         shufps  xmm9, xmm4, 255         subss   xmm7, xmm10         movaps  xmm10, xmm7         xorps   xmm10, xmm1         subss   xmm10, xmm8         subss   xmm3, xmm10         unpcklps        xmm7, xmm3         shufps  xmm6, xmm7, 64         addps   xmm11, xmm4         movlhps xmm5, xmm4         subps   xmm4, xmm6         movss   xmm4, xmm11         subps   xmm7, xmm8         xorps   xmm7, xmm1         shufps  xmm5, xmm7, 66         subps   xmm5, xmm4         xorps   xmm3, xmm1         subss   xmm3, xmm9         shufps  xmm0, xmm0, 255         xorps   xmm0, xmm1         shufps  xmm2, xmm2, 255         subss   xmm0, xmm2         xorps   xmm0, xmm1         movups  xmmword ptr [rdi], xmm5         movups  xmm2, xmmword ptr [rdx + 16]         movaps  xmm5, xmm2         xorps   xmm5, xmm1         movups  xmm7, xmmword ptr [rsi + 16]         subss   xmm5, xmm7         xorps   xmm5, xmm1         movaps  xmm4, xmm2         shufps  xmm4, xmm2, 85         xorps   xmm4, xmm1         movaps  xmm6, xmm2         movaps  xmm8, xmm7         movaps  xmm9, xmm7         subps   xmm9, xmm2         subps   xmm2, xmm7         shufps  xmm7, xmm7, 85         subss   xmm4, xmm7         xorps   xmm4, xmm1         movhlps xmm6, xmm6         xorps   xmm6, xmm1         movhlps xmm8, xmm8         subss   xmm6, xmm8         xorps   xmm6, xmm1         xorps   xmm2, xmm1         subps   xmm2, xmm9         subss   xmm0, xmm3         movaps  xmm3, xmm0         xorps   xmm3, xmm1         subss   xmm3, xmm2         subss   xmm5, xmm3         unpcklps        xmm0, xmm5         xorps   xmm5, xmm1         movaps  xmm3, xmm2         shufps  xmm3, xmm2, 85         subss   xmm5, xmm3         subss   xmm4, xmm5         movaps  xmm3, xmm4         xorps   xmm3, xmm1         movaps  xmm5, xmm2         unpckhpd        xmm5, xmm2         subss   xmm3, xmm5         subss   xmm6, xmm3         unpcklps        xmm4, xmm6         movlhps xmm0, xmm4         movaps  xmm3, xmm2         subps   xmm3, xmm0         subps   xmm0, xmm2         xorps   xmm0, xmm1         subps   xmm0, xmm3         movups  xmmword ptr [rdi + 16], xmm0         ret<\/code><\/pre>\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\/764446\/\"> https:\/\/habr.com\/ru\/articles\/764446\/<\/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<figure class=\"\"><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0435\u0435, \u0442\u043e <a href=\"https:\/\/en.wikipedia.org\/wiki\/Functional_completeness\" rel=\"noopener noreferrer nofollow\">\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u043b\u043d\u043e<\/a> \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u0435 \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u043e\u0439 \u043f\u043e <a href=\"https:\/\/en.wikipedia.org\/wiki\/IEEE_754\" rel=\"noopener noreferrer nofollow\">IEEE-754<\/a>\u00a0. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u0434\u0432\u043e\u0438\u0447\u043d\u0443\u044e \u0441\u0445\u0435\u043c\u0443 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u0438 \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0447\u0430\u0442\u044c \u0441\u043d\u0438\u0437\u0443. \u0426\u0438\u0442\u0430\u0442\u0430 \u0438\u0437 \u0440\u0430\u0437\u0434\u0435\u043b\u0430 6.3 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 IEEE 754-2019:<\/p>\n<blockquote>\n<p>6.3 \u0411\u0438\u0442 \u0437\u043d\u0430\u043a\u0430<\/p>\n<p>[\u2026] \u041a\u043e\u0433\u0434\u0430 \u043d\u0438 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043d\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f NaN, [\u2026]; \u0437\u043d\u0430\u043a \u0441\u0443\u043c\u043c\u044b \u0438\u043b\u0438 \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u0438 <em>x<\/em>\u2212<em>y<\/em>, \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u043e\u0439 \u043a\u0430\u043a \u0441\u0443\u043c\u043c\u0430 <em>x<\/em>+(\u2212<em>y<\/em>), \u0437\u043d\u0430\u043a\u043e\u043c \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c \u043e\u0442 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0445; [\u2026]. \u042d\u0442\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f, \u0434\u0430\u0436\u0435 \u043a\u043e\u0433\u0434\u0430 \u043e\u043f\u0435\u0440\u0430\u043d\u0434\u044b \u0438\u043b\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0440\u0430\u0432\u043d\u044b \u043d\u0443\u043b\u044e \u0438\u043b\u0438 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0441\u0443\u043c\u043c\u0430 \u0434\u0432\u0443\u0445 \u043e\u043f\u0435\u0440\u0430\u043d\u0434\u043e\u0432 \u0441 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u043a\u0430\u043c\u0438 (\u0438\u043b\u0438 \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u044c \u0434\u0432\u0443\u0445 \u043e\u043f\u0435\u0440\u0430\u043d\u0434\u043e\u0432 \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c\u0438 \u0437\u043d\u0430\u043a\u0430\u043c\u0438) \u0440\u0430\u0432\u043d\u0430 \u043d\u0443\u043b\u044e, \u0437\u043d\u0430\u043a \u044d\u0442\u043e\u0439 \u0441\u0443\u043c\u043c\u044b (\u0438\u043b\u0438 \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u0438) \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c +0\u00a0\u043f\u0440\u0438 \u0432\u0441\u0435\u0445 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u0445 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u044f, \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c <code>roundTowardNegative<\/code>; \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0435 \u0437\u043d\u0430\u043a \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0441\u0443\u043c\u043c\u044b (\u0438\u043b\u0438 \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u0438) \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u22120.<\/p>\n<\/blockquote>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u044d\u0442\u043e.<\/p>\n<ol>\n<li>\n<p>\u0412\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u0435 <em>x<\/em>\u2212<em>y<\/em>\u00a0\u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0441\u0443\u043c\u043c\u0430 <em>x<\/em>+(\u2212<em>y<\/em>).<\/p>\n<\/li>\n<li>\n<p>\u041d\u043e\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0437\u043d\u0430\u043a,\u00a0\u22120\u00a0\u0438 0\u00a0\u2014 \u044d\u0442\u043e \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 (\u0445\u043e\u0442\u044f \u043f\u0440\u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>==<\/code> \u043e\u043d\u0438 \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u0440\u0430\u0432\u043d\u044b\u043c\u0438).<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u043e\u0431\u0430 \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0445 \u0438\u043c\u0435\u044e\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0437\u043d\u0430\u043a, \u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u043c\u0435\u0442\u044c \u044d\u0442\u043e\u0442 \u0437\u043d\u0430\u043a. \u041e\u0434\u043d\u0430\u043a\u043e \u0434\u043b\u044f <em>x<\/em>\u2212<em>y<\/em>\u00a0\u044d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 <em>x<\/em>\u00a0\u0438 <em>y<\/em>\u00a0\u0438\u043c\u0435\u044e\u0442 <em>\u0440\u0430\u0437\u043d\u044b\u0435<\/em>\u00a0\u0437\u043d\u0430\u043a\u0438, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u043c\u0435\u0442\u044c \u0437\u043d\u0430\u043a <em>x<\/em>.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 <em>x<\/em>\u00a0\u0438 <em>y<\/em>\u00a0\u0438\u043c\u0435\u044e\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0437\u043d\u0430\u043a, \u0430 <em>x<\/em>\u2212<em>y<\/em>\u00a0\u0440\u0430\u0432\u043d\u043e \u043d\u0443\u043b\u044e, \u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 +0\u00a0\u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0440\u0435\u0436\u0438\u043c\u043e\u0432 \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u044f, \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c <code>roundTowardNegative<\/code>, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u22120.<\/p>\n<\/li>\n<\/ol>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0440\u0435\u0436\u0438\u043c \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u044f <code>roundTiesToEven<\/code>, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u043d. \u041e\u0434\u043d\u0430\u043a\u043e \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0434\u0430\u0436\u0435 \u0434\u043b\u044f <code>roundTowardNegative<\/code>.<\/p>\n<h3>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u0438\u0441\u0442\u0438\u043d\u043d\u043e\u0441\u0442\u0438<\/h3>\n<p>\u0422\u0430\u043a \u0447\u0442\u043e \u0436\u0435 \u044d\u0442\u043e \u0434\u0430\u0451\u0442 \u043d\u0430\u043c \u043f\u0440\u0438 \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u0438 \u043d\u0443\u043b\u0435\u0439?<\/p>\n<pre><code class=\"python\">-0 - -0 = +0  # \u041e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0437\u043d\u0430\u043a, \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c +0. -0 - +0 = -0  # \u0420\u0430\u0437\u043d\u044b\u0435 \u0437\u043d\u0430\u043a\u0438, \u0437\u043d\u0430\u043a \u043e\u0442 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430. +0 - -0 = +0  # \u0420\u0430\u0437\u043d\u044b\u0435 \u0437\u043d\u0430\u043a\u0438, \u0437\u043d\u0430\u043a \u043e\u0442 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430. +0 - +0 = +0  # \u041e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0437\u043d\u0430\u043a, \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c +0.<\/code><\/pre>\n<p>\u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u2026 \u0410 \u0435\u0441\u043b\u0438 \u043c\u044b \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043c \u22120\u00a0\u043a\u0430\u043a false, \u0430 +0\u00a0\u043a\u0430\u043a true?<\/p>\n<pre><code class=\"python\">A B | O ----+-- 0 0 | 1 0 1 | 0 1 0 | 1 1 1 | 1<\/code><\/pre>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0430\u044f\u0441\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0438\u0441\u0442\u0438\u043d\u043d\u043e\u0441\u0442\u0438 \u0431\u0443\u0434\u0435\u0442 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043e\u043c <em>A<\/em>\u2228\u00ac<em>B<\/em>, \u0438\u043b\u0438 <em>B<\/em>\u2192<em>A<\/em>\u00a0(\u0442\u0430\u043a\u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0433\u043e \u043a\u0430\u043a \u0432\u0435\u043d\u0442\u0438\u043b\u044c \u00ab\u0438\u043c\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u044f\u00bb (<a href=\"https:\/\/en.wikipedia.org\/wiki\/IMPLY_gate\" rel=\"noopener noreferrer nofollow\">IMPLY<\/a>), \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438). \u041e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043d\u0430\u0448\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0438\u0441\u0442\u0438\u043d\u043d\u043e\u0441\u0442\u0438 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Functional_completeness\" rel=\"noopener noreferrer nofollow\">\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u043b\u043d\u0430<\/a>, \u0442\u043e \u0435\u0441\u0442\u044c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u044d\u0442\u043e\u0433\u043e \u0432\u0435\u043d\u0442\u0438\u043b\u044f \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0435 \u0441\u0445\u0435\u043c\u044b.<\/p>\n<h3>\u0421\u0445\u0435\u043c\u044b \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u044f<\/h3>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0434\u0435\u043c\u043e \u043d\u0430 Python. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043c \u0438\u0445 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0439 \u0432\u044b\u0432\u043e\u0434:<\/p>\n<p><em>\u0425\u043e\u0442\u044f \u044d\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438,\u00a0\u043f\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 \u0432 IEEE 754 +0\u00a0\u0438 \u22120\u00a0\u043f\u0440\u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u0440\u0430\u0432\u043d\u044b\u043c\u0438. \u0422\u043e \u0435\u0441\u0442\u044c \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0442\u044c \u0438\u0445, \u043d\u0430\u043c \u043f\u0435\u0440\u0435\u0434 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435\u043c \u0441 0 \u043d\u0443\u0436\u043d\u043e \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0437\u043d\u0430\u043a.<\/em><\/p>\n<pre><code class=\"python\">import math  f_false = -0.0 f_true = 0.0 f_repr = lambda x: True if math.copysign(1, x) > 0 else False<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432\u0435\u043d\u0442\u0438\u043b\u044c NOT, \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432\u0448\u0438\u0441\u044c \u0442\u0435\u043c, \u0447\u0442\u043e \u22120\u2212<em>x<\/em>\u00a0\u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442 \u0437\u043d\u0430\u043a \u043d\u0443\u043b\u0435\u0432\u043e\u0433\u043e <em>x<\/em>:<\/p>\n<pre><code class=\"python\">f_not = lambda x: f_false - x<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u044d\u0442\u043e:<\/p>\n<pre><code class=\"python\">>>> f_repr(f_not(f_false)) True >>> f_repr(f_not(f_true)) False<\/code><\/pre>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e! \u041c\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432\u0435\u043d\u0442\u0438\u043b\u044c OR, \u043e\u0431\u0440\u0430\u0442\u0438\u0432 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043c\u044b \u043f\u0435\u0440\u0435\u0434 \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u0435\u043c \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u043c \u0437\u043d\u0430\u043a \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430, \u0442\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c +0\u00a0(true), \u0435\u0441\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u0430 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u043d\u0435 \u0440\u0430\u0432\u043d\u044b \u22120\u00a0(false):<\/p>\n<pre><code class=\"python\">f_or = lambda a, b: a - f_not(b)<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u044d\u0442\u043e:<\/p>\n<pre><code class=\"python\">>>> f_repr(f_or(f_false, f_false)) False >>> f_repr(f_or(f_true,  f_false)) True >>> f_repr(f_or(f_false, f_true)) True >>> f_repr(f_or(f_true, f_true)) True<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c OR \u0438 NOT, \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u0435\u043d\u0442\u0438\u043b\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"python\">f_and = lambda a, b: f_not(f_or(f_not(a), f_not(b))) f_xor = lambda a, b: f_or(f_and(f_not(a), b), f_and(a, f_not(b)))<\/code><\/pre>\n<pre><code class=\"python\">>>> f_repr(f_and(f_false, f_false)) False >>> f_repr(f_and(f_true,  f_false)) False >>> f_repr(f_and(f_false, f_true)) False >>> f_repr(f_and(f_true, f_true)) True  >>> f_repr(f_xor(f_false, f_false)) False >>> f_repr(f_xor(f_true,  f_false)) True >>> f_repr(f_xor(f_false, f_true)) True >>> f_repr(f_xor(f_true, f_true)) False<\/code><\/pre>\n<h3>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0435 \u0446\u0435\u043b\u044b\u0435 \u0447\u0438\u0441\u043b\u0430<\/h3>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u044b \u0441\u043b\u044b\u0448\u0430\u043b\u0438 \u043e soft-float \u2014 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f\u0445 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u0438 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442: \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043e\u0434\u043d\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439. \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0435\u0451 \u043d\u0430 Rust, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u043d\u0430 \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u0434 \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u0435\u0433\u043e <s>\u0443\u0436\u0430\u0441\u043d\u043e\u0439 \u0442\u043e\u0440\u043c\u043e\u0437\u043d\u0443\u0442\u043e\u0441\u0442\u0438<\/s>\u00a0\u0432\u0435\u043b\u0438\u043a\u043e\u043b\u0435\u043f\u0438\u0438.<\/p>\n<pre><code class=\"rust\">type Bit = f32; const ZERO: Bit = -0.0; const ONE: Bit = 0.0;  fn not(x: Bit) -> Bit { ZERO - x } fn or(a: Bit, b: Bit) -> Bit { a - not(b) } fn and(a: Bit, b: Bit) -> Bit { not(or(not(a), not(b))) } fn xor(a: Bit, b: Bit) -> Bit { or(and(not(a), b), and(a, not(b))) } fn adder(a: Bit, b: Bit, c: Bit) -> (Bit, Bit) {     let s = xor(xor(a, b), c);     let c = or(and(xor(a, b), c), and(a, b));     (s, c) }  type SoftU8 = [Bit; 8];  pub fn softu8_add(a: SoftU8, b: SoftU8) -> SoftU8 {     let (s0, c) = adder(a[0], b[0], ZERO);     let (s1, c) = adder(a[1], b[1], c);     let (s2, c) = adder(a[2], b[2], c);     let (s3, c) = adder(a[3], b[3], c);     let (s4, c) = adder(a[4], b[4], c);     let (s5, c) = adder(a[5], b[5], c);     let (s6, c) = adder(a[6], b[6], c);     let (s7, _) = adder(a[7], b[7], c);     [s0, s1, s2, s3, s4, s5, s6, s7] }  \/\/ \u0425\u043c? u8? \u0427\u0442\u043e \u044d\u0442\u043e? \u0422\u0441-\u0441-\u0441-\u0441.... pub fn to_softu8(x: u8) -> SoftU8 {     std::array::from_fn(|i| if (x >> i) &amp; 1 == 1 { ONE } else { ZERO }) }  pub fn from_softu8(x: SoftU8) -> u8 {     (0..8).filter(|i| x[*i].signum() > 0.0).map(|i| 1 &lt;&lt; i).sum() }  fn main() {     let a = to_softu8(23);     let b = to_softu8(19);     println!(\"{}\", from_softu8(softu8_add(a, b))); }<\/code><\/pre>\n<p>\u042d\u0442\u043e \u0443\u0436\u0430\u0441\u043d\u043e, \u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u0442 42. \u0418 \u0434\u043b\u044f \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u0432\u0443\u0445 8-\u0431\u0438\u0442\u043d\u044b\u0445 \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u043d\u0443\u0436\u043d\u043e <em>\u0432\u0441\u0435\u0433\u043e<\/em> \u2248120\u00a0\u043a\u043e\u043c\u0430\u043d\u0434 \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439:<\/p>\n<p><em>\u041d\u0430 x86-64 \u043d\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043e\u0442\u0440\u0438\u0446\u0430\u043d\u0438\u044f \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439, \u0432\u043c\u0435\u0441\u0442\u043e \u043d\u0435\u0451 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043f\u0440\u043e\u0441\u0442\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 XOR \u0441 \u043c\u0430\u0441\u043a\u043e\u0439, \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0438\u0439 \u0441\u0442\u0430\u0440\u0448\u0438\u0439 \u0431\u0438\u0442, \u0442\u043e \u0435\u0441\u0442\u044c \u0431\u0438\u0442 \u0437\u043d\u0430\u043a\u0430 \u0447\u0438\u0441\u043b\u0430 \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 IEEE-754.<\/em><\/p>\n<pre><code>example::softu8_add:         mov     rax, rdi         movups  xmm2, xmmword ptr [rsi]         movups  xmm0, xmmword ptr [rdx]         movaps  xmm3, xmm2         subps   xmm3, xmm0         movaps  xmm4, xmm0         subps   xmm4, xmm2         movaps  xmm1, xmmword ptr [rip + .LCPI0_0]         xorps   xmm4, xmm1         subps   xmm4, xmm3         xorps   xmm3, xmm3         subss   xmm3, xmm4         movaps  xmm6, xmm0         xorps   xmm6, xmm1         subss   xmm6, xmm2         xorps   xmm6, xmm1         subss   xmm6, xmm3         movaps  xmm3, xmm4         shufps  xmm3, xmm4, 85         movaps  xmm5, xmm6         subss   xmm5, xmm3         xorps   xmm5, xmm1         movaps  xmm10, xmm6         xorps   xmm10, xmm1         subss   xmm10, xmm3         movaps  xmm7, xmm0         shufps  xmm7, xmm0, 85         xorps   xmm7, xmm1         movaps  xmm3, xmm2         shufps  xmm3, xmm2, 85         subss   xmm7, xmm3         xorps   xmm7, xmm1         movaps  xmm8, xmm4         unpckhpd        xmm8, xmm4         movaps  xmm3, xmm0         unpckhpd        xmm3, xmm0         xorps   xmm3, xmm1         movaps  xmm9, xmm2         unpckhpd        xmm9, xmm2         subss   xmm3, xmm9         xorps   xmm3, xmm1         xorps   xmm11, xmm11         movaps  xmm9, xmm4         shufps  xmm9, xmm4, 255         subss   xmm7, xmm10         movaps  xmm10, xmm7         xorps   xmm10, xmm1         subss   xmm10, xmm8         subss   xmm3, xmm10         unpcklps        xmm7, xmm3         shufps  xmm6, xmm7, 64         addps   xmm11, xmm4         movlhps xmm5, xmm4         subps   xmm4, xmm6         movss   xmm4, xmm11         subps   xmm7, xmm8         xorps   xmm7, xmm1         shufps  xmm5, xmm7, 66         subps   xmm5, xmm4         xorps   xmm3, xmm1         subss   xmm3, xmm9         shufps  xmm0, xmm0, 255         xorps   xmm0, xmm1         shufps  xmm2, xmm2, 255         subss   xmm0, xmm2         xorps   xmm0, xmm1         movups  xmmword ptr [rdi], xmm5         movups  xmm2, xmmword ptr [rdx + 16]         movaps  xmm5, xmm2         xorps   xmm5, xmm1         movups  xmm7, xmmword ptr [rsi + 16]         subss   xmm5, xmm7         xorps   xmm5, xmm1         movaps  xmm4, xmm2         shufps  xmm4, xmm2, 85         xorps   xmm4, xmm1         movaps  xmm6, xmm2         movaps  xmm8, xmm7         movaps  xmm9, xmm7         subps   xmm9, xmm2         subps   xmm2, xmm7         shufps  xmm7, xmm7, 85         subss   xmm4, xmm7         xorps   xmm4, xmm1         movhlps xmm6, xmm6         xorps   xmm6, xmm1         movhlps xmm8, xmm8         subss   xmm6, xmm8         xorps   xmm6, xmm1         xorps   xmm2, xmm1         subps   xmm2, xmm9         subss   xmm0, xmm3         movaps  xmm3, xmm0         xorps   xmm3, xmm1         subss   xmm3, xmm2         subss   xmm5, xmm3         unpcklps        xmm0, xmm5         xorps   xmm5, xmm1         movaps  xmm3, xmm2         shufps  xmm3, xmm2, 85         subss   xmm5, xmm3         subss   xmm4, xmm5         movaps  xmm3, xmm4         xorps   xmm3, xmm1         movaps  xmm5, xmm2         unpckhpd        xmm5, xmm2         subss   xmm3, xmm5         subss   xmm6, xmm3         unpcklps        xmm4, xmm6         movlhps xmm0, xmm4         movaps  xmm3, xmm2         subps   xmm3, xmm0         subps   xmm0, xmm2         xorps   xmm0, xmm1         subps   xmm0, xmm3         movups  xmmword ptr [rdi + 16], xmm0         ret<\/code><\/pre>\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\/764446\/\"> https:\/\/habr.com\/ru\/articles\/764446\/<\/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-356266","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/356266","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=356266"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/356266\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=356266"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=356266"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=356266"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}