{"id":458483,"date":"2025-05-03T15:00:13","date_gmt":"2025-05-03T15:00:13","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=458483"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=458483","title":{"rendered":"<span>\u0411\u044b\u0441\u0442\u0440\u043e\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0451\u043d\u043d\u043e\u0435 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0447\u0438\u0441\u0435\u043b \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u043e\u0439<\/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>\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0447\u0438\u0441\u0435\u043b \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u043e\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0451\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0430, \u0438, \u0437\u0430 \u0441\u0447\u0451\u0442 \u044d\u0442\u043e\u0433\u043e, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u0435. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u0442\u043e\u0447\u043d\u044b\u043c, \u043e\u0434\u043d\u0430\u043a\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u044b\u043c \u0442\u0430\u043c, \u0433\u0434\u0435 \u043e\u0441\u043e\u0431\u0430\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f.<\/p>\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0444\u043e\u0440\u043c\u0430\u0442 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0447\u0438\u0441\u0435\u043b float \u044f\u0437\u044b\u043a\u0430 C++, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c \u0441 \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u043c binary32 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 IEEE 754 &#8212; 2008 (IEEE Standard for Floating-Point Arithmetic).<br \/> \u0414\u043b\u044f \u043a\u0440\u0430\u0442\u043a\u043e\u0441\u0442\u0438, \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0442\u043e, \u0447\u0442\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u043f\u043e\u043b\u0435 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0447\u0438\u0441\u043b\u0430 \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u043e\u0439, \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u00ab\u043f\u043e\u0440\u044f\u0434\u043a\u043e\u043c\u00bb (Exponent), \u0430 \u0442\u043e, \u0447\u0442\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u043f\u043e\u043b\u0435 \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u044b \u2013 \u00ab\u043c\u0430\u043d\u0442\u0438\u0441\u0441\u043e\u0439\u00bb (Mantissa). \u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u2013 \u043d\u0435 \u0442\u043e, \u0447\u0442\u043e \u0432 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0434 \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u043e\u0439 \u0438 \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u043c. \u041d\u043e \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044d\u0442\u0438 \u0442\u0435\u0440\u043c\u0438\u043d\u044b \u043d\u0438 \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0443\u0442, \u0442\u043e \u043d\u0435\u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e\u0441\u0442\u0435\u0439 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c.<\/p>\n<h2>\u0423\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435<\/h2>\n<h3>\u0423\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b<\/h3>\n<p>\u0412 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 float \u0447\u0438\u0441\u043b\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 32 \u0431\u0438\u0442\u0430\u0445, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043c\u043b\u0430\u0434\u0448\u0438\u0435 23 \u0431\u0438\u0442\u0430 \u0445\u0440\u0430\u043d\u044f\u0442 \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u0443 M, \u043a \u043d\u0438\u043c \u043f\u0440\u0438\u043c\u044b\u043a\u0430\u044e\u0442 8 \u0431\u0438\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0445\u0440\u0430\u043d\u044f\u0442 \u043f\u043e\u0440\u044f\u0434\u043e\u043a E, \u0438 \u0441\u0430\u043c\u044b\u043c \u0441\u0442\u0430\u0440\u0448\u0438\u043c \u0431\u0438\u0442\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u0438\u0442 \u0437\u043d\u0430\u043a\u0430 S. \u0415\u0441\u043b\u0438 \u0431\u0438\u0442 \u0437\u043d\u0430\u043a\u0430 \u0440\u0430\u0432\u0435\u043d 1, \u0442\u043e \u0447\u0438\u0441\u043b\u043e \u2013 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435. \u041f\u043e\u043a\u0430 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043b\u0438\u0448\u044c \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u0438\u0442 \u0437\u043d\u0430\u043a\u0430 = 0. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u0440\u044f\u0434\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0441\u0442\u043e\u044f\u0442 \u0438\u0437 \u043d\u0443\u043b\u0435\u0432\u044b\u0445 \u0431\u0438\u0442\u043e\u0432, \u0438\u043b\u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u0437 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u0445, \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c\u0438, \u0438 \u043c\u044b \u0438\u0445 \u0442\u043e\u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u0437\u0434\u043d\u0435\u0435.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\n<\/th>\n<th>\n<p align=\"left\">\u0417\u043d\u0430\u043a<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u041f\u043e\u0440\u044f\u0434\u043e\u043a<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u041c\u0430\u043d\u0442\u0438\u0441\u0441\u0430<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/p>\n<\/td>\n<td>\n<p align=\"left\">S<\/p>\n<\/td>\n<td>\n<p align=\"left\">E<\/p>\n<\/td>\n<td>\n<p align=\"left\">M<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0420\u0430\u0437\u043c\u0435\u0440 \u0432 \u0431\u0438\u0442\u0430\u0445<\/p>\n<\/td>\n<td>\n<p align=\"left\">1<\/p>\n<\/td>\n<td>\n<p align=\"left\">8<\/p>\n<\/td>\n<td>\n<p align=\"left\">23<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041c\u0430\u043d\u0442\u0438\u0441\u0441\u0443 \u0443\u0434\u043e\u0431\u043d\u043e \u0434\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u0446\u0435\u043b\u0435\u0439 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0447\u0438\u0441\u043b\u043e \u0441 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u043e\u0439, \u043f\u0440\u0438\u0447\u0451\u043c \u044d\u0442\u0430 \u0442\u043e\u0447\u043a\u0430 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0430 \u0441\u0440\u0430\u0437\u0443 \u0441\u043b\u0435\u0432\u0430 \u043e\u0442 \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u044b. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0435\u0441\u043b\u0438 \u0441\u0430\u043c\u044b\u0439 \u0441\u0442\u0430\u0440\u0448\u0438\u0439 \u0431\u0438\u0442 \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u044b \u0445\u0440\u0430\u043d\u0438\u0442 1, \u0442\u043e \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u0430 M = 0.5<br \/> \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u043d\u0435\u043a\u043e\u0435 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e r &gt; 0 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0432\u0438\u0434\u0435:<\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"r = m 2^{P}\" alt=\"r = m 2^{P}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/5c\/5c1\/5c195430bf23511c4a351240db1c96e0.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/5c\/5c1\/5c195430bf23511c4a351240db1c96e0.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/5c\/5c1\/5c195430bf23511c4a351240db1c96e0.svg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u043f\u0443\u0441\u0442\u044c <img decoding=\"async\" class=\"formula inline\" source=\"P = \\left \\lfloor \\log_2 r \\right \\rfloor\" alt=\"P = \\left \\lfloor \\log_2 r \\right \\rfloor\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4\/4c\/4ca\/4cadf981754d4c8d5bc84eebe8d11284.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4\/4c\/4ca\/4cadf981754d4c8d5bc84eebe8d11284.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4\/4c\/4ca\/4cadf981754d4c8d5bc84eebe8d11284.svg 781w\" loading=\"lazy\" decode=\"async\"\/><br \/> \u041d\u0438\u0436\u043d\u0438\u043c\u0438 \u043f\u043e\u043b\u0443\u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u043c\u0438 \u0441\u043a\u043e\u0431\u043a\u0430\u043c\u0438 <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\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/8\/83\/83e\/83ea273cc257e98314f110cb43a14b63.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/8\/83\/83e\/83ea273cc257e98314f110cb43a14b63.svg 781w\" loading=\"lazy\" decode=\"async\"\/> \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u0447\u0438\u0441\u043b\u0430 x \u0432\u043d\u0438\u0437 \u0434\u043e \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0433\u043e \u0446\u0435\u043b\u043e\u0433\u043e. \u0414\u043b\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e x \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e \u0442\u043e\u0436\u0434\u0435\u0441\u0442\u0432\u043e:<br \/> <img decoding=\"async\" class=\"formula inline\" source=\"x = \\left \\lfloor x \\right \\rfloor +  \\{x\\}\" alt=\"x = \\left \\lfloor x \\right \\rfloor +  \\{x\\}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2\/20\/204\/204fb9539979edba0b61e2bb77bde42a.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2\/20\/204\/204fb9539979edba0b61e2bb77bde42a.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2\/20\/204\/204fb9539979edba0b61e2bb77bde42a.svg 781w\" loading=\"lazy\" decode=\"async\"\/>, \u0433\u0434\u0435 \u0434\u0440\u043e\u0431\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0447\u0438\u0441\u043b\u0430: <img decoding=\"async\" class=\"formula inline\" source=\"0 \u2264 \\{ x \\} &lt; 1\" alt=\"0 \u2264 \\{ x \\} &lt; 1\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d\/d6\/d6b\/d6b8afd191f8da8c2c534faabfa368d6.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d\/d6\/d6b\/d6b8afd191f8da8c2c534faabfa368d6.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d\/d6\/d6b\/d6b8afd191f8da8c2c534faabfa368d6.svg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<p>\u0420\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0435\u043c m:<\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"m = r 2^{-P}=2^{\\log_2 r - P}=2^{\\log_2 r - \\left \\lfloor \\log_2 r \\right \\rfloor }=2^{ \\left \\{ \\log_2 r \\right \\} }\" alt=\"m = r 2^{-P}=2^{\\log_2 r - P}=2^{\\log_2 r - \\left \\lfloor \\log_2 r \\right \\rfloor }=2^{ \\left \\{ \\log_2 r \\right \\} }\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d\/d3\/d35\/d35170cc43cef06ed512a7032f1a9b8c.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d\/d3\/d35\/d35170cc43cef06ed512a7032f1a9b8c.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d\/d3\/d35\/d35170cc43cef06ed512a7032f1a9b8c.svg 781w\" loading=\"lazy\" decode=\"async\"\/><img decoding=\"async\" class=\"formula\" source=\"1 \\leqslant m &lt; 2\" alt=\"1 \\leqslant m &lt; 2\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/5c\/5c8\/5c8985c38ae4bc489de3eb35397d45da.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/5c\/5c8\/5c8985c38ae4bc489de3eb35397d45da.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/5c\/5c8\/5c8985c38ae4bc489de3eb35397d45da.svg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<p>\u0415\u0441\u043b\u0438 \u043c\u044b \u0445\u0440\u0430\u043d\u0438\u043c \u0447\u0438\u0441\u043b\u043e r \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 float, \u0442\u043e \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f:<br \/> \u041c\u0430\u043d\u0442\u0438\u0441\u0441\u0430 M = m &#8212; 1<br \/> \u041f\u043e\u0440\u044f\u0434\u043e\u043a E = P + BIAS, \u0433\u0434\u0435 BIAS \u2013 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0444\u043e\u0440\u043c\u0430\u0442\u0430. \u0414\u043b\u044f \u0444\u043e\u0440\u043c\u0430\u0442\u0430 float: BIAS = 0x7F = 127<br \/> \u0412\u044b\u0440\u0430\u0437\u0438\u043c r \u0447\u0435\u0440\u0435\u0437 \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u0443 \u0438 \u043f\u043e\u0440\u044f\u0434\u043e\u043a:<\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"r=(1+M) 2^{E-BIAS}\" alt=\"r=(1+M) 2^{E-BIAS}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d\/d4\/d44\/d44e10626e9c46eaad71a5423276b1c6.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d\/d4\/d44\/d44e10626e9c46eaad71a5423276b1c6.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d\/d4\/d44\/d44e10626e9c46eaad71a5423276b1c6.svg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c:<\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"E = \\left \\lfloor \\log_2 r \\right \\rfloor + BIAS\" alt=\"E = \\left \\lfloor \\log_2 r \\right \\rfloor + BIAS\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e\/e6\/e62\/e626926f56039c89d037375497e0d5ae.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e\/e6\/e62\/e626926f56039c89d037375497e0d5ae.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e\/e6\/e62\/e626926f56039c89d037375497e0d5ae.svg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u0432\u0430 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0447\u0438\u0441\u043b\u0430: x &gt; 0 \u0438 y &gt; 0. \u0412\u044b\u0440\u0430\u0437\u0438\u043c \u0438\u0445 \u0447\u0435\u0440\u0435\u0437 \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u044b \u0438 \u043f\u043e\u0440\u044f\u0434\u043a\u0438:<\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"x=(1+M_x) 2^{E_x-BIAS}\" alt=\"x=(1+M_x) 2^{E_x-BIAS}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/73\/733\/733c62b73d3a22da2f0b366d143733aa.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/73\/733\/733c62b73d3a22da2f0b366d143733aa.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/73\/733\/733c62b73d3a22da2f0b366d143733aa.svg 781w\" loading=\"lazy\" decode=\"async\"\/><img decoding=\"async\" class=\"formula\" source=\"y=(1+M_y) 2^{E_y-BIAS}\" alt=\"y=(1+M_y) 2^{E_y-BIAS}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/ad\/ad3\/ad3267838fd35a435b78f4b2d59b82b6.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/ad\/ad3\/ad3267838fd35a435b78f4b2d59b82b6.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/ad\/ad3\/ad3267838fd35a435b78f4b2d59b82b6.svg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<p>\u041a\u0430\u043a \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e \u0438\u0437 \u0430\u043b\u0433\u0435\u0431\u0440\u044b, \u0434\u043b\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e:<\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"x y=2^{\\log_2 (x y)}=2^{\\log_2 x +\\log_2 y} \" alt=\"x y=2^{\\log_2 (x y)}=2^{\\log_2 x +\\log_2 y} \" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c\/c1\/c17\/c17bde27fb56849057e3c4301e1b466e.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c\/c1\/c17\/c17bde27fb56849057e3c4301e1b466e.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c\/c1\/c17\/c17bde27fb56849057e3c4301e1b466e.svg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<p>\u041f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0441\u044e\u0434\u0430 \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u044b \u0438 \u043f\u043e\u0440\u044f\u0434\u043a\u0438:<\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"x y =2^{\\log_2 \\left ((1+M_x) 2^{E_x - BIAS} \\right ) +\\ log_2 \\left ((1+M_y) 2^{E_y-BIAS} \\right )} = \\\\ = 2^{\\log_2 (1+M_x)  +\\ log_2 (1+M_y)  + E_x + E_y - 2 BIAS} \" alt=\"x y =2^{\\log_2 \\left ((1+M_x) 2^{E_x - BIAS} \\right ) +\\ log_2 \\left ((1+M_y) 2^{E_y-BIAS} \\right )} = \\\\ = 2^{\\log_2 (1+M_x)  +\\ log_2 (1+M_y)  + E_x + E_y - 2 BIAS} \" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e\/e4\/e43\/e430190bbc7549cb7fa9378322205a0f.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e\/e4\/e43\/e430190bbc7549cb7fa9378322205a0f.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e\/e4\/e43\/e430190bbc7549cb7fa9378322205a0f.svg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u044b \u0432 \u043d\u0430\u0448\u0435\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"0 \\leqslant M &lt; 1\" alt=\"0 \\leqslant M &lt; 1\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/53\/53c\/53cfa1a735a37a0e15d812aa706e432b.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/53\/53c\/53cfa1a735a37a0e15d812aa706e432b.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/53\/53c\/53cfa1a735a37a0e15d812aa706e432b.svg 781w\" loading=\"lazy\" decode=\"async\"\/>, \u0442\u043e \u043d\u0430\u0439\u0434\u0451\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <img decoding=\"async\" class=\"formula inline\" source=\"\\log_2 (1+M)\" alt=\"\\log_2 (1+M)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f\/fb\/fb5\/fb56e21e6bb9c33dd4e7a9296217f70e.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f\/fb\/fb5\/fb56e21e6bb9c33dd4e7a9296217f70e.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f\/fb\/fb5\/fb56e21e6bb9c33dd4e7a9296217f70e.svg 781w\" loading=\"lazy\" decode=\"async\"\/> \u043d\u0430 \u043e\u0431\u043e\u0438\u0445 \u043a\u043e\u043d\u0446\u0430\u0445 \u044d\u0442\u043e\u0433\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430:<\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"\\log_2 (1+M) \\vert_{M = 0} = 0\" alt=\"\\log_2 (1+M) \\vert_{M = 0} = 0\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f\/fa\/fa0\/fa05af799cce47f3b5e1cb96869dd13e.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f\/fa\/fa0\/fa05af799cce47f3b5e1cb96869dd13e.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f\/fa\/fa0\/fa05af799cce47f3b5e1cb96869dd13e.svg 781w\" loading=\"lazy\" decode=\"async\"\/><img decoding=\"async\" class=\"formula\" source=\"\\log_2 (1+M) \\vert_{M = 1} = 1\" alt=\"\\log_2 (1+M) \\vert_{M = 1} = 1\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/55\/554\/554cfc18cb9f1cafbcd8b32caac0e0ce.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/55\/554\/554cfc18cb9f1cafbcd8b32caac0e0ce.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/55\/554\/554cfc18cb9f1cafbcd8b32caac0e0ce.svg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u0430 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 <img decoding=\"async\" class=\"formula inline\" source=\"\\log_2 (1+M)\" alt=\"\\log_2 (1+M)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f\/fb\/fb5\/fb56e21e6bb9c33dd4e7a9296217f70e.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f\/fb\/fb5\/fb56e21e6bb9c33dd4e7a9296217f70e.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f\/fb\/fb5\/fb56e21e6bb9c33dd4e7a9296217f70e.svg 781w\" loading=\"lazy\" decode=\"async\"\/> \u043d\u0430 \u043e\u0431\u043e\u0438\u0445 \u043a\u043e\u043d\u0446\u0430\u0445 \u0441\u0432\u043e\u0435\u0433\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u0435\u0439 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435:<\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"\\log_2 (1+M) \\approx {M}\" alt=\"\\log_2 (1+M) \\approx {M}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/3\/3b\/3bb\/3bbff59370a309d2df3111ed09cdf213.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/3\/3b\/3bb\/3bbff59370a309d2df3111ed09cdf213.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/3\/3b\/3bb\/3bbff59370a309d2df3111ed09cdf213.svg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<p>\u041e\u0446\u0435\u043d\u0438\u043c \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u0439\u0434\u0451\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 M, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u0448\u0438\u043c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"(log_2(1+M) - M)\u2019=0\" alt=\"(log_2(1+M) - M)\u2019=0\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2\/2f\/2f0\/2f097003b1d4bf775c658e253721b2f4.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2\/2f\/2f0\/2f097003b1d4bf775c658e253721b2f4.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2\/2f\/2f0\/2f097003b1d4bf775c658e253721b2f4.svg 781w\" loading=\"lazy\" decode=\"async\"\/>. \u0420\u0435\u0448\u0438\u0432 \u0435\u0433\u043e, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c, \u0447\u0442\u043e \u044d\u043a\u0441\u0442\u0440\u0435\u043c\u0443\u043c \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 <img decoding=\"async\" class=\"formula inline\" source=\"M= (1\/{\\ln 2}) \u2013 1 \\approx 0.443\" alt=\"M= (1\/{\\ln 2}) \u2013 1 \\approx 0.443\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/7e\/7e0\/7e0e43bd842e1a3ab69e34b1aa414d29.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/7e\/7e0\/7e0e43bd842e1a3ab69e34b1aa414d29.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/7e\/7e0\/7e0e43bd842e1a3ab69e34b1aa414d29.svg 781w\" loading=\"lazy\" decode=\"async\"\/>. \u0412 \u044d\u0442\u043e\u0439 \u0442\u043e\u0447\u043a\u0435 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0432\u043d\u043e 0.086, \u0447\u0442\u043e \u043d\u0435 \u0442\u0430\u043a \u0443\u0436 \u0438 \u043c\u043d\u043e\u0433\u043e.<br \/> \u041f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u043d\u0430\u0448\u0443 \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u044e \u0432 \u0444\u043e\u0440\u043c\u0443\u043b\u0443 \u0434\u043b\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f:<\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"x y \\approx 2^{M_x  + M_y + E_x + E_y - 2 BIAS} \" alt=\"x y \\approx 2^{M_x  + M_y + E_x + E_y - 2 BIAS} \" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2\/28\/28d\/28d659b7829e6daefc86d3c60ad42df8.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2\/28\/28d\/28d659b7829e6daefc86d3c60ad42df8.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2\/28\/28d\/28d659b7829e6daefc86d3c60ad42df8.svg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<p>\u041e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043c <img decoding=\"async\" class=\"formula inline\" source=\"r = x y\" alt=\"r = x y\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2\/20\/201\/201a289a75e23c8feeca81b013b25c4d.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2\/20\/201\/201a289a75e23c8feeca81b013b25c4d.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2\/20\/201\/201a289a75e23c8feeca81b013b25c4d.svg 781w\" loading=\"lazy\" decode=\"async\"\/>. \u041f\u043e\u0440\u044f\u0434\u043e\u043a \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u0435\u043d:<\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"E = \\left \\lfloor \\log_2 r \\right \\rfloor + BIAS \\approx  \\left \\lfloor M_x  + M_y + E_x + E_y - 2 BIAS \\right \\rfloor + BIAS = \\left \\lfloor M_x  + M_y \\right \\rfloor + E_x + E_y - BIAS \" alt=\"E = \\left \\lfloor \\log_2 r \\right \\rfloor + BIAS \\approx  \\left \\lfloor M_x  + M_y + E_x + E_y - 2 BIAS \\right \\rfloor + BIAS = \\left \\lfloor M_x  + M_y \\right \\rfloor + E_x + E_y - BIAS \" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9\/95\/95f\/95f7e3121104ac2e295604d0daebd75f.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9\/95\/95f\/95f7e3121104ac2e295604d0daebd75f.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9\/95\/95f\/95f7e3121104ac2e295604d0daebd75f.svg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u0430 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <img decoding=\"async\" class=\"formula inline\" source=\"0 \\leqslant M &lt; 1\" alt=\"0 \\leqslant M &lt; 1\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/53\/53c\/53cfa1a735a37a0e15d812aa706e432b.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/53\/53c\/53cfa1a735a37a0e15d812aa706e432b.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/53\/53c\/53cfa1a735a37a0e15d812aa706e432b.svg 781w\" loading=\"lazy\" decode=\"async\"\/>, \u0442\u043e \u0441\u0443\u043c\u043c\u0430 \u0434\u0432\u0443\u0445 \u043c\u0430\u043d\u0442\u0438\u0441\u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0432 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"0 \u2264 M_x  + M_y &lt; 2\" alt=\"0 \u2264 M_x  + M_y &lt; 2\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2\/24\/247\/247b856dd9e6840f3ca7d339619319db.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2\/24\/247\/247b856dd9e6840f3ca7d339619319db.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2\/24\/247\/247b856dd9e6840f3ca7d339619319db.svg 781w\" loading=\"lazy\" decode=\"async\"\/>. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u0432\u0430 \u0441\u043b\u0443\u0447\u0430\u044f.<br \/> \u0421\u043b\u0443\u0447\u0430\u0439 1: <img decoding=\"async\" class=\"formula inline\" source=\"M_x  + M_y &lt; 1\" alt=\"M_x  + M_y &lt; 1\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1\/10\/108\/10843e3956d0c36fa835e1427626cd68.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1\/10\/108\/10843e3956d0c36fa835e1427626cd68.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1\/10\/108\/10843e3956d0c36fa835e1427626cd68.svg 781w\" loading=\"lazy\" decode=\"async\"\/><br \/> \u041e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u0432\u043d\u0438\u0437 \u0441\u0443\u043c\u043c\u044b \u043e\u0431\u043d\u0443\u043b\u0438\u0442\u0441\u044f: <img decoding=\"async\" class=\"formula inline\" source=\"\\left \\lfloor M_x  + M_y \\right \\rfloor = 0\" alt=\"\\left \\lfloor M_x  + M_y \\right \\rfloor = 0\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d\/df\/df3\/df3c59b10009cc33a545022440c4d034.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d\/df\/df3\/df3c59b10009cc33a545022440c4d034.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d\/df\/df3\/df3c59b10009cc33a545022440c4d034.svg 781w\" loading=\"lazy\" decode=\"async\"\/><br \/> \u0422\u043e\u0433\u0434\u0430 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f: <img decoding=\"async\" class=\"formula inline\" source=\"E = E_x + E_y \u2013 {BIAS}\" alt=\"E = E_x + E_y \u2013 {BIAS}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d\/da\/da5\/da5c115b7c32e935dbe8e1c0772db5ef.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d\/da\/da5\/da5c115b7c32e935dbe8e1c0772db5ef.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d\/da\/da5\/da5c115b7c32e935dbe8e1c0772db5ef.svg 781w\" loading=\"lazy\" decode=\"async\"\/><br \/> \u0421\u043b\u0443\u0447\u0430\u0439 2: <img decoding=\"async\" class=\"formula inline\" source=\"1 \u2264 M_x  + M_y &lt; 2\" alt=\"1 \u2264 M_x  + M_y &lt; 2\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9\/92\/925\/92506e2b2853cd623bdde35ee8aef031.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9\/92\/925\/92506e2b2853cd623bdde35ee8aef031.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9\/92\/925\/92506e2b2853cd623bdde35ee8aef031.svg 781w\" loading=\"lazy\" decode=\"async\"\/><br \/> \u041e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u0432\u043d\u0438\u0437 \u0441\u0443\u043c\u043c\u044b: <img decoding=\"async\" class=\"formula inline\" source=\"\\left \\lfloor M_x  + M_y \\right \\rfloor = 1\" alt=\"\\left \\lfloor M_x  + M_y \\right \\rfloor = 1\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6\/67\/67d\/67d57050ac303f0c408f92e654841a88.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6\/67\/67d\/67d57050ac303f0c408f92e654841a88.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6\/67\/67d\/67d57050ac303f0c408f92e654841a88.svg 781w\" loading=\"lazy\" decode=\"async\"\/><br \/> \u0422\u043e\u0433\u0434\u0430 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f: <img decoding=\"async\" class=\"formula inline\" source=\"E = E_x + E_y \u2013 BIAS + 1\" alt=\"E = E_x + E_y \u2013 BIAS + 1\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/55\/552\/5525cd89fc3cadc17b2f632bf2091e80.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/55\/552\/5525cd89fc3cadc17b2f632bf2091e80.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/55\/552\/5525cd89fc3cadc17b2f632bf2091e80.svg 781w\" loading=\"lazy\" decode=\"async\"\/><br \/> \u0418 \u0437\u0434\u0435\u0441\u044c \u043d\u0443\u0436\u043d\u043e \u0443\u0447\u0435\u0441\u0442\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0443\u0434\u0430\u0447\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0435\u0439 \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u044b \u0438 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 float. \u0415\u0441\u043b\u0438 \u043c\u044b \u0441\u043b\u043e\u0436\u0438\u043c \u0434\u0432\u0430 \u0442\u0430\u043a\u0438\u0445 \u0447\u0438\u0441\u043b\u0430, \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u043e \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u044f \u0438\u0445 \u043a\u0430\u043a \u0446\u0435\u043b\u044b\u0435 \u0447\u0438\u0441\u043b\u0430, \u0442\u043e \u0435\u0441\u043b\u0438 \u043f\u0440\u0438 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043c\u0430\u043d\u0442\u0438\u0441\u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0431\u0443\u0434\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 1, \u0442\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442 \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u0435\u0434\u0438\u043d\u0438\u0446\u044b \u0432 \u043f\u043e\u043b\u0435 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430. \u0422\u043e \u0435\u0441\u0442\u044c, \u043d\u0430\u043c, \u043f\u043e \u0441\u0443\u0442\u0438 \u0434\u0435\u043b\u0430, \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e: \u043e\u0431\u0430 \u0441\u043b\u0443\u0447\u0430\u044f \u0441\u0443\u043c\u043c\u044b \u043c\u0430\u043d\u0442\u0438\u0441\u0441 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c.<br \/> \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0439\u0434\u0451\u043c \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u0443 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f. \u041a\u0430\u043a \u043c\u044b \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438:<\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"M=m-1=2^{ \\left \\{ \\log_2 r \\right \\} }-1\" alt=\"M=m-1=2^{ \\left \\{ \\log_2 r \\right \\} }-1\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c\/cc\/ccd\/ccd2f8a45a9ef16305ed0c4576ee9c76.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c\/cc\/ccd\/ccd2f8a45a9ef16305ed0c4576ee9c76.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c\/cc\/ccd\/ccd2f8a45a9ef16305ed0c4576ee9c76.svg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<p>\u041f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0441\u044e\u0434\u0430 \u043d\u0430\u0448\u0443 \u0430\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0430\u0446\u0438\u044e:<\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"r = x y \\approx 2^{M_x  + M_y + E_x + E_y - 2 BIAS} \" alt=\"r = x y \\approx 2^{M_x  + M_y + E_x + E_y - 2 BIAS} \" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e\/ed\/ed7\/ed7ab375e4dd2cb75b4508ec356e0524.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e\/ed\/ed7\/ed7ab375e4dd2cb75b4508ec356e0524.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e\/ed\/ed7\/ed7ab375e4dd2cb75b4508ec356e0524.svg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<p>\u0422\u043e\u0433\u0434\u0430:<\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"M\u22482^{ \\left \\{ M_x  + M_y + E_x + E_y - 2 BIAS \\right \\} }-1\" alt=\"M\u22482^{ \\left \\{ M_x  + M_y + E_x + E_y - 2 BIAS \\right \\} }-1\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/74\/74c\/74c18e76710424efcce4b01805659935.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/74\/74c\/74c18e76710424efcce4b01805659935.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/74\/74c\/74c18e76710424efcce4b01805659935.svg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a <img decoding=\"async\" class=\"formula inline\" source=\"E_x, E_y\" alt=\"E_x, E_y\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c\/c0\/c04\/c047e187e9116498557884e26b40df29.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c\/c0\/c04\/c047e187e9116498557884e26b40df29.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c\/c0\/c04\/c047e187e9116498557884e26b40df29.svg 781w\" loading=\"lazy\" decode=\"async\"\/> \u0438 BIAS \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u0446\u0435\u043b\u044b\u0435 \u0447\u0438\u0441\u043b\u0430, \u0442\u043e \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u0438\u0437 \u0432\u0437\u044f\u0442\u0438\u044f \u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438. \u041e\u0441\u0442\u0430\u0451\u0442\u0441\u044f:<\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"M\u22482^{ \\left \\{ M_x  + M_y \\right \\} }-1\" alt=\"M\u22482^{ \\left \\{ M_x  + M_y \\right \\} }-1\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1\/13\/13f\/13f19a04d6037a6389bc0e51655b0b00.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1\/13\/13f\/13f19a04d6037a6389bc0e51655b0b00.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1\/13\/13f\/13f19a04d6037a6389bc0e51655b0b00.svg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<p>\u0414\u043b\u044f \u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e \u043d\u0435\u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e: <img decoding=\"async\" class=\"formula inline\" source=\"0 \u2264 \\left \\{ M_x  + M_y \\right \\} &lt; 1\" alt=\"0 \u2264 \\left \\{ M_x  + M_y \\right \\} &lt; 1\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9\/94\/943\/9436c45ed56c6002aaa931f4480d1ffb.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9\/94\/943\/9436c45ed56c6002aaa931f4480d1ffb.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9\/94\/943\/9436c45ed56c6002aaa931f4480d1ffb.svg 781w\" loading=\"lazy\" decode=\"async\"\/>. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430\u0448\u0443 \u0430\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0430\u0446\u0438\u044e:<\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"\\left \\{ M_x  + M_y \\right \\} \\approx \\log_2 (1+ \\left \\{ M_x  + M_y \\right \\}) \" alt=\"\\left \\{ M_x  + M_y \\right \\} \\approx \\log_2 (1+ \\left \\{ M_x  + M_y \\right \\}) \" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6\/6a\/6a9\/6a92298d4687398170340e056024f351.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6\/6a\/6a9\/6a92298d4687398170340e056024f351.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6\/6a\/6a9\/6a92298d4687398170340e056024f351.svg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<p>\u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f:<\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"M \\approx \\left \\{ M_x  + M_y \\right \\}\" alt=\"M \\approx \\left \\{ M_x  + M_y \\right \\}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/51\/51c\/51c805bd25f5a73bbdc65d8013353260.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/51\/51c\/51c805bd25f5a73bbdc65d8013353260.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/51\/51c\/51c805bd25f5a73bbdc65d8013353260.svg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<p>\u0414\u0440\u043e\u0431\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043e\u0442 \u0441\u0443\u043c\u043c\u044b \u043c\u0430\u043d\u0442\u0438\u0441\u0441 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u0442\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u0432\u0441\u0435 \u0431\u0438\u0442\u044b \u0441\u0443\u043c\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u043b\u0435\u0437\u043b\u0438 \u0437\u0430 \u043f\u043e\u043b\u0435 \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u044b.<br \/> \u0418\u0442\u0430\u043a, \u0443\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0444\u043e\u0440\u043c\u0443\u043b\u044b \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0451\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f, \u0441 \u0442\u043e\u0439 \u043e\u0433\u043e\u0432\u043e\u0440\u043a\u043e\u0439, \u0447\u0442\u043e \u043c\u044b \u043f\u043e\u043a\u0430 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u043b\u0443\u0447\u0430\u0438 \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438:<\/p>\n<pre><code class=\"cpp\">typedef signed __int32 i32; typedef unsigned __int32 u32;  \/* \u0427\u0438\u0441\u043b\u043e \u043e\u0434\u0438\u043d\u0430\u0440\u043d\u043e\u0439 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0420\u0430\u0437\u043c\u0435\u0440: 32 \u0431\u0438\u0442\u0430 \u041c\u0430\u043d\u0442\u0438\u0441\u0441\u0430: 23 \u0431\u0438\u0442\u0430 \u041f\u043e\u0440\u044f\u0434\u043e\u043a: 8 \u0431\u0438\u0442\u043e\u0432 *\/  union Float { i32 i; u32 u; float f; };  #define BITS_PER_ALL32 #define BITS_PER_MANTISSA23  #define BIAS0x7F #define EXP_BIAS(BIAS &lt;&lt; BITS_PER_MANTISSA) #define EXP_ONE(1 &lt;&lt; BITS_PER_MANTISSA) #define EXP_MASK(0xFF &lt;&lt; BITS_PER_MANTISSA)  #define SIGN_MASK(1 &lt;&lt; (BITS_PER_ALL - 1))  \/\/ \u041f\u0440\u0438\u0431\u043b\u0438\u0436\u0451\u043d\u043d\u043e\u0435 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 float apprMul(float xf, float yf) { Float x, y, result; x.f = xf; y.f = yf; result.u = x.u + y.u - EXP_BIAS; return result.f; } <\/code><\/pre>\n<h3>\u0423\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043e\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438. \u0411\u0438\u0442 \u0437\u043d\u0430\u043a\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e XOR \u0431\u0438\u0442\u043e\u0432 \u0437\u043d\u0430\u043a\u0430 \u0441\u043e\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0435\u0439. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0435\u0441\u043b\u0438 \u043c\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c XOR \u0441\u043e\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0435\u0439 \u0446\u0435\u043b\u0438\u043a\u043e\u043c, \u043a\u0430\u043a \u0435\u0441\u043b\u0438 \u0431\u044b \u043e\u043d\u0438 \u0431\u044b\u043b\u0438 \u0446\u0435\u043b\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438, \u0442\u043e \u0441\u0442\u0430\u0440\u0448\u0438\u0439 \u0431\u0438\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u044d\u0442\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u0435\u043d \u0437\u043d\u0430\u043a\u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f.<br \/> \u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u0441\u0443\u043c\u043c\u0438\u0440\u0443\u0435\u043c \u0434\u0432\u0430 \u0431\u0438\u0442\u0430, \u0442\u043e \u043c\u043b\u0430\u0434\u0448\u0438\u0439 \u0431\u0438\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0442\u043e\u0436\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 XOR \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0445.<br \/> \u0421\u043f\u0440\u0430\u0432\u0430 \u043e\u0442 \u043f\u043e\u043b\u044f \u0437\u043d\u0430\u043a\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e\u043b\u0435 \u043f\u043e\u0440\u044f\u0434\u043a\u0430. \u041c\u044b \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043a \u043f\u043e\u043b\u044e \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0447\u0438\u0441\u043b\u043e, \u0437\u0430\u0442\u0435\u043c \u0435\u0449\u0451 \u043e\u0434\u043d\u043e \u0447\u0438\u0441\u043b\u043e \u043e\u0442\u043d\u0438\u043c\u0430\u0435\u043c. \u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u0438\u0445 \u0434\u0432\u0443\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u043e \u043d\u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430, \u043d\u0438 \u0437\u0430\u0451\u043c\u0430, \u0442\u043e \u0431\u0438\u0442 \u0437\u043d\u0430\u043a\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u043a\u0430\u043a \u0441\u0443\u043c\u043c\u0443 \u0431\u0438\u0442\u043e\u0432 \u0437\u043d\u0430\u043a\u043e\u0432 \u0441\u043e\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0435\u0439. \u0422\u043e \u0435\u0441\u0442\u044c, \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0451\u043d\u043d\u043e\u0433\u043e \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0443\u0436\u0435 \u0432\u044b\u0432\u0435\u043b\u0438 \u0434\u043b\u044f \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u043e\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0435\u0439, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0438 \u0434\u043b\u044f \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445, \u0431\u0435\u0437 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439.<\/p>\n<h3>\u0410\u043d\u0442\u0438\u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 (Underflow)<\/h3>\n<p>\u041a\u0430\u043a \u043c\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u0438, \u043f\u0440\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u0445 \u0441 \u043f\u043e\u043b\u0435\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u0439\u0442\u0438 \u0437\u0430 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d. \u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u0430\u043d\u0442\u0438\u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u042d\u0442\u0430 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438 \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u0438 \u0438\u0437 \u0441\u0443\u043c\u043c\u044b \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b BIAS \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043c\u0435\u043d\u044c\u0448\u0435, \u043b\u0438\u0431\u043e \u0440\u0430\u0432\u0435\u043d \u043d\u0443\u043b\u044e. \u0420\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e \u043d\u0443\u043b\u044e \u0442\u043e\u0436\u0435 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043a \u0430\u043d\u0442\u0438\u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0443\u043b\u0435\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044f \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0437\u0430\u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0434\u043b\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.<br \/> \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0430\u043d\u0442\u0438\u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u0431\u043d\u0443\u043b\u044f\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u0414\u0435\u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c, \u0442\u0430\u043a \u043a\u0430\u043a \u0443 \u043d\u0430\u0441 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0435\u0442\u043e\u0447\u043d\u043e\u0435. \u041e\u0431\u044b\u0447\u043d\u043e, \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u0435\u043f\u0435\u043d\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442 \u0430\u043d\u0442\u0438\u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435, \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u044c \u0434\u0432\u0443\u0445 \u043e\u0447\u0435\u043d\u044c \u0431\u043b\u0438\u0437\u043a\u0438\u0445 \u0447\u0438\u0441\u0435\u043b. \u0422\u0430\u043a \u0447\u0442\u043e \u043e\u0431\u043d\u0443\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0432 \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0432\u043f\u043e\u043b\u043d\u0435 \u043e\u043f\u0440\u0430\u0432\u0434\u0430\u043d\u043e: \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0438 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043d\u043e\u043b\u044c.<br \/> \u041f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u043c \u0430\u043d\u0442\u0438\u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f: \u043f\u043e\u0441\u043b\u0435 \u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0435 \u0431\u044b\u043b\u043e (\u0442\u043e \u0435\u0441\u0442\u044c, \u0431\u0438\u0442 \u0437\u043d\u0430\u043a\u0430 \u043d\u0435 \u043f\u043e\u0432\u0440\u0435\u0436\u0434\u0451\u043d), \u043e\u0434\u043d\u0430\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b BIAS \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u0451\u043b \u0437\u0430\u0451\u043c \u0438\u0437 \u043f\u043e\u043b\u044f \u0437\u043d\u0430\u043a\u0430, \u043b\u0438\u0431\u043e \u043f\u043e\u043b\u0435 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u043e\u0431\u043d\u0443\u043b\u0438\u043b\u043e\u0441\u044c.<br \/> \u0411\u0438\u0442 \u0437\u043d\u0430\u043a\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0437\u043d\u0430\u043a \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c, \u043c\u044b \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u043e \u043d\u0430\u0439\u0434\u0451\u043c \u0435\u0433\u043e \u0447\u0435\u0440\u0435\u0437 XOR \u0441\u043e\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0435\u0439, \u0438 \u043f\u0440\u043e\u043a\u0441\u043e\u0440\u0438\u043c \u0435\u0433\u043e \u0441 \u0441\u0443\u043c\u043c\u043e\u0439 \u0441\u043e\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0435\u0439.<br \/> \u0427\u0442\u043e\u0431\u044b \u0432\u043c\u0435\u0441\u0442\u043e \u0434\u0432\u0443\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u0443, \u043c\u044b \u0432\u044b\u0447\u0442\u0435\u043c \u0438\u0437 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0443. \u042d\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442 \u0437\u0430\u0451\u043c \u043b\u0438\u0448\u044c \u0432 \u0434\u0432\u0443\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445: \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u0435 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0431\u044b\u043b\u043e \u0440\u0430\u0432\u043d\u043e 0 \u2013 \u0442\u043e\u0433\u0434\u0430 \u0437\u0430\u0451\u043c \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f, \u0447\u0442\u043e \u043d\u0430\u043c \u0438 \u043d\u0443\u0436\u043d\u043e, \u0438 \u043a\u043e\u0433\u0434\u0430 \u0441\u0443\u043c\u043c\u0430 \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432 \u0431\u044b\u043b\u0430 \u0442\u0430\u043a\u043e\u0439 \u0431\u043e\u043b\u044c\u0448\u043e\u0439, \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u044f BIAS \u0438\u043c\u0435\u043b\u0430 \u0432\u0438\u0434 \u0432 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438: 100\u202600, \u043f\u0440\u0438\u0447\u0451\u043c \u0441\u0442\u0430\u0440\u0448\u0438\u0439 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u0439 \u0431\u0438\u0442 \u043f\u043e\u043f\u0430\u0434\u0430\u043b \u0432 \u043f\u043e\u043b\u0435 \u0437\u043d\u0430\u043a\u0430. \u041e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u0430 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u0435\u043b\u0430\u0435\u0442 \u043b\u043e\u0436\u043d\u043e\u0439 \u043d\u0430\u0448\u0443 \u043f\u0435\u0440\u0432\u0443\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443: \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0434\u043e \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u044f, \u0442\u0430\u043a \u0447\u0442\u043e \u0432 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043c\u044b \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0442\u0435\u0440\u044f\u0435\u043c.<br \/> \u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u0430\u043c\u043e\u0433\u043e \u0441\u0442\u0430\u0440\u0448\u0435\u0433\u043e \u0431\u0438\u0442\u0430, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0447\u0438\u0441\u043b\u043e \u043d\u0430 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u043a\u0430\u043a \u0435\u0441\u043b\u0438 \u0431\u044b \u043e\u043d\u043e \u0431\u044b\u043b\u043e \u0437\u043d\u0430\u043a\u043e\u0432\u044b\u043c \u0446\u0435\u043b\u044b\u043c. \u0423 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0441\u0430\u043c\u044b\u0439 \u0441\u0442\u0430\u0440\u0448\u0438\u0439 \u0431\u0438\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0432 1.<br \/> \u041d\u0430\u0448 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0442\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u0438\u0434:<\/p>\n<pre><code class=\"cpp\">\/\/ \u041f\u0440\u0438\u0431\u043b\u0438\u0436\u0451\u043d\u043d\u043e\u0435 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 float apprMul(float xf, float yf) { Float x, y, result; x.f = xf; y.f = yf; u32 sign = (x.u ^ y.u) &amp; SIGN_MASK; i32 sum = (x.u + y.u) ^ sign; result.u = sum - EXP_BIAS; if(sum &gt;= 0 &amp;&amp; (i32)(result.u - EXP_ONE) &lt; 0) { return 0; } result.u ^= sign; return result.f; } <\/code><\/pre>\n<h3>\u041f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 (Overflow)<\/h3>\n<p>\u041f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442, \u0435\u0441\u043b\u0438 \u0434\u043e \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b BIAS \u0431\u044b\u043b \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u0432 \u043f\u043e\u043b\u0435 \u0437\u043d\u0430\u043a\u0430, \u0438 \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u0435 \u044d\u0442\u043e \u043d\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043b\u043e. \u041b\u0438\u0431\u043e \u0435\u0441\u043b\u0438 \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u0435 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u0445 \u0431\u0438\u0442\u043e\u0432 \u2013 \u044d\u0442\u043e \u0437\u0430\u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0434\u043b\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.<br \/> \u041f\u0440\u0438 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u043c\u0435\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0441\u0442\u0435\u043f\u0435\u043d\u044c, \u0438 \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u0438\u0441\u043a\u0443\u0448\u0435\u043d\u0438\u0435 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u044c. \u041e\u0434\u043d\u0430\u043a\u043e \u0442\u0430\u043a \u0434\u0435\u043b\u0430\u0442\u044c \u043e\u043f\u0430\u0441\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044d\u0442\u043e \u2013 \u043d\u0435 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0430\u044f \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u044c. \u0415\u0441\u043b\u0438 \u043c\u044b \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u043c\u043d\u043e\u0436\u0438\u043b\u0438 \u0447\u0438\u0441\u043b\u043e \u043d\u0430 2, \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0447\u0435\u0433\u043e \u043e\u043d\u043e \u0432\u044b\u0448\u043b\u043e \u0437\u0430 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043f\u043e\u0434\u0435\u043b\u0438\u043b\u0438 \u043d\u0430 4 (\u0438\u043d\u0430\u0447\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, \u0443\u043c\u043d\u043e\u0436\u0438\u043b\u0438 \u043d\u0430 0.25), \u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c\u044b\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d. \u041e\u0434\u043d\u0430\u043a\u043e \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043d\u0430 4 \u0442\u0430\u043a \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0435\u0435 \u0438\u0437\u0431\u0435\u0433\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0447\u0435\u043c \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c.<br \/> \u0414\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430, \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0441\u0442\u044c.<br \/> \u041d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0441\u0442\u044c (Indefinite) \u2013 \u044d\u0442\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432 \u043f\u043e\u043b\u044f\u0445 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0438 \u0437\u043d\u0430\u043a\u0430 \u0438\u043c\u0435\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u0435 \u0431\u0438\u0442\u044b, \u0432 \u043f\u043e\u043b\u0435 \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u044b \u0438\u043c\u0435\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c \u0432 1 \u0441\u0430\u043c\u044b\u0439 \u0441\u0442\u0430\u0440\u0448\u0438\u0439 \u0431\u0438\u0442, \u0430 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0431\u0438\u0442\u044b \u2013 \u043d\u0443\u043b\u0435\u0432\u044b\u0435. \u0424\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e, \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0441\u0442\u044c \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043a \u00ab\u0442\u0438\u0445\u0438\u043c\u00bb \u043d\u0435\u0447\u0438\u0441\u043b\u0430\u043c (QNAN) \u2013 \u0442\u043e \u0435\u0441\u0442\u044c, \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439.<br \/> \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0441\u043b\u0443\u0447\u0430\u044e \u0430\u043d\u0442\u0438\u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u0441\u0432\u0435\u0441\u0442\u0438 \u0434\u0432\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u043e\u043b\u044f \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u043a \u043e\u0434\u043d\u043e\u0439, \u043c\u044b \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u0431\u0430\u0432\u0438\u043c \u043a \u043f\u043e\u0440\u044f\u0434\u043a\u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 1. \u042d\u0442\u043e \u0432\u044b\u0437\u043e\u0432\u0435\u0442 \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u0432 \u043f\u043e\u043b\u0435 \u0437\u043d\u0430\u043a\u0430, \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u0435 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043b\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u0435\u0434\u0438\u043d\u0438\u0446. \u0412\u0442\u043e\u0440\u043e\u0439 \u0441\u043b\u0443\u0447\u0430\u0439, \u043a\u043e\u0433\u0434\u0430 \u0431\u0438\u0442 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430 \u0441\u0431\u0440\u043e\u0441\u0438\u0442\u0441\u044f \u0432 0, \u0432\u043e\u0437\u043c\u043e\u0436\u0435\u043d \u043b\u0438\u0448\u044c \u0442\u043e\u0433\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u0434\u043e \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u044f BIAS \u0441\u0443\u043c\u043c\u0430 \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432 \u0431\u044b\u043b\u0430 \u0440\u0430\u0432\u043d\u0430 126 = 0x7E, \u043e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0432\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439.<br \/> \u0422\u0435\u043f\u0435\u0440\u044c \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"cpp\">\/\/ \u041d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0441\u0442\u044c #define INDEFINITE(SIGN_MASK | EXP_MASK | (1 &lt;&lt; (BITS_PER_MANTISSA - 1)))  \/\/ \u041f\u0440\u0438\u0431\u043b\u0438\u0436\u0451\u043d\u043d\u043e\u0435 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 float apprMul(float xf, float yf) { Float x, y, result; x.f = xf; y.f = yf; u32 sign = (x.u ^ y.u) &amp; SIGN_MASK; i32 sum = (x.u + y.u) ^ sign; result.u = sum - EXP_BIAS; if(sum &lt; 0) { if((i32)(result.u + EXP_ONE) &lt; 0) { \/\/ \u041f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 (Overflow) result.u = INDEFINITE; return result.f; } } else { if((i32)(result.u - EXP_ONE) &lt; 0) { \/\/ \u0410\u043d\u0442\u0438\u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 (Underflow) return 0; } }  \/\/ \u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u043a\u0430  \/\/ \u0415\u0441\u043b\u0438 \u043c\u044b \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u0437\u0434\u0435\u0441\u044c, \u0442\u043e \u043f\u043e\u043b\u0435 \u0437\u043d\u0430\u043a\u0430 \u043d\u0435 \u043f\u043e\u0432\u0440\u0435\u0436\u0434\u0435\u043d\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u043c, \/\/ \u0438 \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0440\u0430\u0432\u043d\u043e 0. \/\/ \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0432\u043c\u0435\u0441\u0442\u043e: \/\/ result.u ^= sign; \/\/ \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c: \/\/ result.u |= sign; \/\/ \u0438\u043b\u0438 \/\/ result.u += sign;  result.u ^= sign; return result.f; }  <\/code><\/pre>\n<h3>\u0423\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u043d\u043e\u043b\u044c \u0438 \u0434\u0435\u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430<\/h3>\n<p>\u041d\u043e\u043b\u044c \u0438 \u0434\u0435\u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0438\u043c\u0435\u044e\u0442 \u043d\u0443\u043b\u0435\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 \u043f\u043e\u0440\u044f\u0434\u043a\u0430. \u041f\u0440\u0438\u0447\u0451\u043c \u043d\u043e\u043b\u044c \u0438\u043c\u0435\u0435\u0442 \u043d\u0443\u043b\u0435\u0432\u0443\u044e \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u0443, \u0430 \u0434\u0435\u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u2013 \u043d\u0435\u043d\u0443\u043b\u0435\u0432\u0443\u044e. \u0414\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0434\u0435\u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0440\u0430\u0432\u043d\u044b\u043c\u0438 \u043d\u0443\u043b\u044e. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0435\u0441\u043b\u0438 \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u043e\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0435\u0439 \u0438\u043c\u0435\u043b \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u043f\u043e\u0440\u044f\u0434\u043e\u043a, \u0442\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0432\u043d\u044b\u043c \u043d\u0443\u043b\u044e.<br \/> \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438.<br \/> \u041f\u0435\u0440\u0432\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u044f\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u043c\u0430\u0441\u043a\u043e\u0439 \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u043c \u043f\u043e\u043b\u0435 \u043f\u043e\u0440\u044f\u0434\u043a\u0430, \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0435\u0433\u043e \u043d\u0430 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e \u043d\u0443\u043b\u044e:<\/p>\n<pre><code class=\"cpp\">if(((x.u &amp; EXP_MASK ) == 0) | ((y.u &amp; EXP_MASK) == 0)) return 0; <\/code><\/pre>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432\u043c\u0435\u0441\u0442\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u044e \u2013 \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u044b, \u0442\u043e \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u043c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438. \u0415\u0441\u043b\u0438 \u043c\u044b \u0441\u043b\u043e\u0436\u0438\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0441 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043e\u0439, \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0435\u0439 \u0438\u0437 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u0445 \u0431\u0438\u0442\u043e\u0432: 11\u202611, \u0442\u043e \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u0432 \u0441\u0442\u0430\u0440\u0448\u0438\u0439 \u0440\u0430\u0437\u0440\u044f\u0434 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442 \u0442\u043e\u0433\u0434\u0430 \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0433\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043d\u0435 \u0431\u044b\u043b\u0430 \u0440\u0430\u0432\u043d\u0430 \u043d\u0443\u043b\u044e. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043c\u044b \u0441\u043b\u043e\u0436\u0438\u043c \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432  \u0441 11\u202611, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0432\u043e\u0437\u043d\u0438\u043a \u043b\u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0438. \u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u044f \u0431\u044b \u0443 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432 \u0435\u0433\u043e \u043d\u0435 \u0431\u044b\u043b\u043e, \u0442\u043e \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0431\u044b\u043b \u043d\u0443\u043b\u0435\u0432\u044b\u043c, \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u0440\u0430\u0432\u0435\u043d \u043d\u0443\u043b\u044e.<\/p>\n<pre><code class=\"cpp\">if((i32)(((x.u &amp; EXP_MASK ) + EXP_MASK) &amp; ((y.u &amp; EXP_MASK) + EXP_MASK)) &gt;= 0) return 0; <\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"cpp\">\/\/ \u041f\u0440\u0438\u0431\u043b\u0438\u0436\u0451\u043d\u043d\u043e\u0435 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 float apprMul(float xf, float yf) { Float x, y, result; x.f = xf; y.f = yf;  if(((x.u &amp; EXP_MASK ) == 0) | ((y.u &amp; EXP_MASK ) == 0)) return 0;  u32 sign = (x.u ^ y.u) &amp; SIGN_MASK; i32 sum = (x.u + y.u) ^ sign; result.u = sum - EXP_BIAS; if(sum &lt; 0) { if((i32)(result.u + EXP_ONE) &lt; 0) { \/\/ \u041f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 (Overflow) result.u = INDEFINITE; return result.f; } } else { if((i32)(result.u - EXP_ONE) &lt; 0) { \/\/ \u0410\u043d\u0442\u0438\u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 (Underflow) return 0; } }  \/\/ \u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u043a\u0430  result.u ^= sign; return result.f; } <\/code><\/pre>\n<h3>\u0423\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u044c, \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0441\u0442\u044c \u0438 \u043d\u0435\u0447\u0438\u0441\u043b\u0430<\/h3>\n<p>\u0411\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u044c, \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0441\u0442\u044c \u0438 \u043d\u0435\u0447\u0438\u0441\u043b\u0430 \u0438\u043c\u0435\u044e\u0442 \u043f\u043e\u043b\u0435 \u043f\u043e\u0440\u044f\u0434\u043a\u0430, \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0438\u0437 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u0445 \u0431\u0438\u0442\u043e\u0432: 11\u202611. \u0414\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0431\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u0442\u0430\u043a\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0441\u0442\u044c\u044e.<br \/> \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0441\u043e\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0435\u0439 \u043d\u0430 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e 11\u202611 \u043c\u043e\u0436\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e:<\/p>\n<pre><code class=\"cpp\">if(((x.u &amp; EXP_MASK ) == EXP_MASK) | ((y.u &amp; EXP_MASK) == EXP_MASK)) { result.u = INDEFINITE; return result.f; } <\/code><\/pre>\n<p>\u041b\u0438\u0431\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0444\u0430\u043a\u0442. \u0415\u0441\u043b\u0438 \u0441\u043b\u043e\u0436\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0441 1, \u0442\u043e \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442 \u0442\u043e\u0433\u0434\u0430 \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0433\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0441\u0442\u043e\u044f\u043b\u0430 \u0438\u0437 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u0445 \u0431\u0438\u0442\u043e\u0432: 11\u202611. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0435\u0441\u043b\u0438 \u0445\u043e\u0442\u044f \u0431\u044b \u0443 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u0441\u043e\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0435\u0439 \u043f\u0440\u0438 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0441 1 \u0432\u043e\u0437\u043d\u0438\u043a \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u2013 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0441\u0442\u044c.<\/p>\n<pre><code class=\"cpp\">if((i32)(((x.u &amp; EXP_MASK ) + EXP_ONE) | ((y.u &amp; EXP_MASK) + EXP_ONE)) &lt; 0) { result.u = INDEFINITE; return result.f; } <\/code><\/pre>\n<p>\u0418 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0438\u0442\u043e\u0433\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c\u0438 \u0441\u043e\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u044f\u043c\u0438:<\/p>\n<pre><code class=\"cpp\">\/\/ \u041f\u0440\u0438\u0431\u043b\u0438\u0436\u0451\u043d\u043d\u043e\u0435 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 float apprMul(float xf, float yf) { Float x, y, result; x.f = xf; y.f = yf;  u32 xe = x.u &amp; EXP_MASK; u32 ye = y.u &amp; EXP_MASK;  if((i32)((xe + EXP_ONE) | (ye + EXP_ONE)) &lt; 0) { result.u = INDEFINITE; return result.f; }  if((i32)((xe + EXP_MASK) &amp; (ye + EXP_MASK)) &gt;= 0) return 0;  u32 sign = (x.u ^ y.u) &amp; SIGN_MASK; i32 sum = (x.u + y.u) ^ sign; result.u = sum - EXP_BIAS; if(sum &lt; 0) { if((i32)(result.u + EXP_ONE) &lt; 0) { \/\/ \u041f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 (Overflow) result.u = INDEFINITE; return result.f; } } else { if((i32)(result.u - EXP_ONE) &lt; 0) { \/\/ \u0410\u043d\u0442\u0438\u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 (Underflow) return 0; } }  \/\/ \u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u043a\u0430  result.u ^= sign; return result.f; } <\/code><\/pre>\n<h3>\u0423\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u0435\u0437 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u043e\u0432<\/h3>\n<p>\u041f\u0440\u043e\u0432\u0435\u0434\u0451\u043c \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u0443\u044e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u0430\u043f\u043e\u0432. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u043c\u0435\u0441\u0442\u043e \u043d\u0435\u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432 \u0437\u0430\u043f\u0438\u0448\u0435\u043c \u044f\u0432\u043d\u0443\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043f\u043e\u043b\u044f \u0437\u043d\u0430\u043a\u0430:<\/p>\n<pre><code class=\"cpp\">\/\/ \u041f\u0440\u0438\u0431\u043b\u0438\u0436\u0451\u043d\u043d\u043e\u0435 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 float apprMul(float xf, float yf) { Float x, y, result; x.f = xf; y.f = yf;  u32 xe = x.u &amp; EXP_MASK; u32 ye = y.u &amp; EXP_MASK;  if(((xe + EXP_ONE) | (ye + EXP_ONE)) &amp; SIGN_MASK) { result.u = INDEFINITE; return result.f; }  if((((xe + EXP_MASK) &amp; (ye + EXP_MASK)) &amp; SIGN_MASK) == 0) return 0;  u32 sign = (x.u ^ y.u) &amp; SIGN_MASK; i32 sum = (x.u + y.u) ^ sign; result.u = sum - EXP_BIAS; if(sum &amp; SIGN_MASK) { if((result.u + EXP_ONE) &amp; SIGN_MASK) { \/\/ \u041f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 (Overflow) result.u = INDEFINITE; return result.f; } } else { if((result.u - EXP_ONE) &amp; SIGN_MASK) { \/\/ \u0410\u043d\u0442\u0438\u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 (Underflow) return 0; } }  \/\/ \u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u043a\u0430  result.u ^= sign; return result.f; } <\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0438\u0437\u0431\u0430\u0432\u0438\u043c\u0441\u044f \u043e\u0442 return \u0432 \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0441\u043e\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0435\u0439 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0432 \u043a\u043e\u043d\u0435\u0446 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<pre><code class=\"cpp\">\/\/ \u041f\u0440\u0438\u0431\u043b\u0438\u0436\u0451\u043d\u043d\u043e\u0435 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 float apprMul8(float xf, float yf) { Float x, y, result; x.f = xf; y.f = yf;  u32 sign = (x.u ^ y.u) &amp; SIGN_MASK; i32 sum = (x.u + y.u) ^ sign; u32 t = sum - EXP_BIAS; result.u = t ^ sign; if(sum &amp; SIGN_MASK) { if((t + EXP_ONE) &amp; SIGN_MASK) { \/\/ \u041f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 (Overflow) result.u = INDEFINITE; } } else { if((t - EXP_ONE) &amp; SIGN_MASK) { \/\/ \u0410\u043d\u0442\u0438\u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 (Underflow) result.u = 0; } }  u32 xe = x.u &amp; EXP_MASK; u32 ye = y.u &amp; EXP_MASK;  if((((xe + EXP_MASK) &amp; (ye + EXP_MASK)) &amp; SIGN_MASK) == 0) result.u = 0;  if(((xe + EXP_ONE) | (ye + EXP_ONE)) &amp; SIGN_MASK) result.u = INDEFINITE;  return result.f; } <\/code><\/pre>\n<p>\u041b\u0435\u0433\u043a\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432\u0441\u0435 \u043d\u0430\u0448\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442 \u043b\u0438\u0448\u044c \u043f\u043e\u043b\u0435 \u0437\u043d\u0430\u043a\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0437\u0430\u0433\u0440\u043e\u043c\u043e\u0436\u0434\u0430\u0442\u044c \u043a\u043e\u0434, \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e:<\/p>\n<pre><code class=\"cpp\">\/\/ \u0415\u0441\u043b\u0438 expr &lt; 0, \u0442\u043e \u0432\u043e\u0437\u0440\u0430\u0449\u0430\u0435\u0442 ifTrue, \u0438\u043d\u0430\u0447\u0435 ifFalse u32 ifSign(i32 expr, u32 ifTrue, u32 ifFalse) { \/\/ \u0422\u0430\u043a \u043a\u0430\u043a expr - \u0437\u043d\u0430\u043a\u043e\u0432\u043e\u0435 \u0446\u0435\u043b\u043e\u0435, \u0442\u043e \u0441\u0434\u0432\u0438\u0433 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \/\/ \u0441 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u0437\u043d\u0430\u043a\u0430 return ((ifTrue ^ ifFalse) &amp; (expr &gt;&gt; (BITS_PER_ALL - 1))) ^ ifFalse; } <\/code><\/pre>\n<p>\u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0442\u043e\u0442 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432 \u0431\u0443\u043b\u0435\u0432\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 ((a ^ b) &amp; c) ^ b \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 a, \u0435\u0441\u043b\u0438 c = 1; \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 b, \u0435\u0441\u043b\u0438 c = 0. \u0412\u043c\u0435\u0441\u0442\u043e c \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043c\u0430\u0441\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u043b\u0438\u0431\u043e \u0438\u0437 \u043d\u0443\u043b\u0435\u0439, \u043b\u0438\u0431\u043e \u0438\u0437 \u0435\u0434\u0438\u043d\u0438\u0446.<br \/> \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0451\u043d\u043d\u043e\u0433\u043e \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u0435\u0437 \u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u0439 \u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0441\u043e\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0438, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u2013 \u0434\u0435\u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430, \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u0438, \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0441\u0442\u0438 \u0438 \u043d\u0435\u0447\u0438\u0441\u043b\u0430.<\/p>\n<pre><code class=\"cpp\">float apprMul(float xf, float yf) { Float x, y, result; x.f = xf; y.f = yf;  u32 sign = (x.u ^ y.u) &amp; SIGN_MASK; i32 sum = (x.u + y.u) ^ sign; u32 t = sum - EXP_BIAS; result.u = t ^ sign; result.u = ifSign(sum, ifSign(t + EXP_ONE, INDEFINITE, result.u), ifSign(t - EXP_ONE, 0, result.u));  u32 xe = x.u &amp; EXP_MASK; u32 ye = y.u &amp; EXP_MASK;  result.u = ifSign((xe + EXP_MASK) &amp; (ye + EXP_MASK), result.u, 0); result.u = ifSign((xe + EXP_ONE) | (ye + EXP_ONE), INDEFINITE, result.u);  return result.f; } <\/code><\/pre>\n<p>\u0421\u0442\u0440\u043e\u0433\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u0432\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u0438\u0434\u0430 ifSign(\u2026, \u2026, 0) \u043c\u043e\u0436\u043d\u043e \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 XOR \u0441 \u043d\u0443\u043b\u0451\u043c. \u041d\u043e \u0441 \u044d\u0442\u0438\u043c \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0438 \u0441\u0430\u043c \u043c\u043e\u0436\u0435\u0442 \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c\u0441\u044f.<\/p>\n<h2>\u0414\u0435\u043b\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u2013 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f, \u043e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u043a \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044e, \u0442\u043e \u0438\u0437 \u043d\u0430\u0448\u0435\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u044b \u0434\u043b\u044f \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0451\u043d\u043d\u043e\u0433\u043e \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0444\u043e\u0440\u043c\u0443\u043b\u0430 \u0434\u043b\u044f \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0451\u043d\u043d\u043e\u0433\u043e \u0434\u0435\u043b\u0435\u043d\u0438\u044f.<br \/> \u041f\u0435\u0440\u0432\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0437\u0430\u043f\u0438\u0448\u0435\u043c \u043f\u043e\u043a\u0430 \u0431\u0435\u0437 \u0443\u0447\u0451\u0442\u0430 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.<\/p>\n<pre><code class=\"cpp\">float apprDiv(float xf, float yf) { Float x, y, result; x.f = xf; y.f = yf; result.u = x.u - y.u + EXP_BIAS; return result.f; } <\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u043f\u0440\u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043e\u0441\u043e\u0431\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u0435\u0432, \u0442\u043e \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u0441 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438, \u043a\u0430\u043a \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u0441 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<h3>\u041f\u0440\u0438\u0431\u043b\u0438\u0436\u0451\u043d\u043d\u043e\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f<\/h3>\n<p>\u0427\u0442\u043e\u0431\u044b \u043d\u0430\u0439\u0442\u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u043d\u0443\u0436\u043d\u043e \u0435\u0434\u0438\u043d\u0438\u0446\u0443 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430 \u044d\u0442\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e. \u0412 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 float \u0443 \u0435\u0434\u0438\u043d\u0438\u0446\u044b \u043d\u0443\u043b\u0435\u0432\u0430\u044f \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u0430 \u0438 \u043d\u0443\u043b\u0435\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 \u0437\u043d\u0430\u043a\u0430, \u0430 \u0432 \u043f\u043e\u043b\u0435 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f BIAS. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0451\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u043c\u0435\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u0438\u0434:<\/p>\n<pre><code class=\"cpp\">float apprOneDiv(float yf) { Float y, result; y.f = yf; result.u = EXP_BIAS * 2 - y.u; return result.f; } <\/code><\/pre>\n<p>\u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u0441 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438, \u0442\u0430\u043a \u0438 \u0441 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438, \u043d\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u00ab\u0445\u043e\u0440\u043e\u0448\u0438\u0439\u00bb: \u0442\u043e \u0435\u0441\u0442\u044c, \u043d\u0435 \u0440\u0430\u0432\u0435\u043d \u043d\u0443\u043b\u044e \u043b\u0438\u0431\u043e \u0434\u0440\u0443\u0433\u0438\u043c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c, \u0438 \u0447\u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0432\u0435\u043b\u0438\u043a, \u0438 \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u0430\u043b.<\/p>\n<h3>\u0410\u043d\u0442\u0438\u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u0438<\/h3>\n<p>\u0410\u043d\u0442\u0438\u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442, \u043a\u043e\u0433\u0434\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u0430\u043b, \u0438 \u0432 \u043f\u043e\u043b\u0435 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e: \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0438\u0437 \u043f\u043e\u043b\u044f \u0437\u043d\u0430\u043a\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0437\u0430\u0451\u043c. \u041b\u0438\u0431\u043e \u0435\u0441\u043b\u0438 \u0432 \u043f\u043e\u043b\u0435 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u043e\u043b\u044c.<br \/> \u041f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u043c \u0430\u043d\u0442\u0438\u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f: \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u044f \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u0451\u043b \u0437\u0430\u0451\u043c (\u0442\u043e \u0435\u0441\u0442\u044c, \u0431\u0438\u0442 \u0437\u043d\u0430\u043a\u0430 \u043f\u043e\u0432\u0440\u0435\u0436\u0434\u0451\u043d), \u0438 \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b BIAS \u044d\u0442\u0443 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e \u043d\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043b\u0438\u0431\u043e \u043f\u043e\u043b\u0435 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u043e\u0431\u043d\u0443\u043b\u0438\u043b\u043e\u0441\u044c.<br \/> \u0422\u043e\u0447\u043d\u043e \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u043f\u0440\u0438 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0438, \u043e\u0442\u043d\u0438\u043c\u0435\u043c \u043e\u0442 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 1, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0437\u0430\u0451\u043c, \u0435\u0441\u043b\u0438 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0441\u0442\u0430\u043b \u0440\u0430\u0432\u0435\u043d 0.<br \/> \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u0438\u0434:<\/p>\n<pre><code class=\"cpp\">float apprDiv(float xf, float yf) { Float x, y, result; x.f = xf; y.f = yf; u32 sign = (x.u ^ y.u) &amp; SIGN_MASK; i32 dif = (x.u - y.u) ^ sign; result.u = dif + EXP_BIAS; if(dif &lt; 0 &amp;&amp; (i32)(result.u - EXP_ONE) &lt; 0) { \/\/ \u0410\u043d\u0442\u0438\u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 (Underflow) return 0; } result.u ^= sign; return result.f; } <\/code><\/pre>\n<h3>\u041f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u0438<\/h3>\n<p>\u041f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442, \u0435\u0441\u043b\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0432\u0435\u043b\u0438\u043a. \u041f\u0440\u0438 \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u0438 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0435 \u043c\u043e\u0436\u0435\u0442, \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u043f\u043e\u043b\u0435 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u2013 \u043d\u0435\u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u044f \u043a \u043f\u043e\u0440\u044f\u0434\u043a\u0443 \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443 BIAS.<br \/> \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u043c \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e, \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u0435 \u0437\u043d\u0430\u043a\u0430 \u043d\u0435 \u043f\u043e\u0432\u0440\u0435\u0436\u0434\u0435\u043d\u043e, \u043e\u0434\u043d\u0430\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 BIAS \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u0432 \u043f\u043e\u043b\u0435 \u0437\u043d\u0430\u043a\u0430.<br \/> \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044e, \u043f\u0440\u0438\u0431\u0430\u0432\u0438\u043c \u043a \u043f\u043e\u0440\u044f\u0434\u043a\u0443 1, \u0447\u0442\u043e\u0431\u044b \u0441\u043f\u0440\u043e\u0432\u043e\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043d\u043e\u0441, \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u0435 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0441\u0442\u043e\u044f\u043b\u043e \u0438\u0437 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u0445 \u0431\u0438\u0442\u043e\u0432.<\/p>\n<pre><code class=\"cpp\">float apprDiv(float xf, float yf) { Float x, y, result; x.f = xf; y.f = yf; u32 sign = (x.u ^ y.u) &amp; SIGN_MASK; i32 dif = (x.u - y.u) ^ sign; result.u = dif + EXP_BIAS; if(dif &lt; 0) { if((i32)(result.u - EXP_ONE) &lt; 0) { \/\/ \u0410\u043d\u0442\u0438\u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 (Underflow) return 0; } } else { if((i32)(result.u + EXP_ONE) &lt; 0) { \/\/ \u041f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 (Overflow) result.u = INDEFINITE; return result.f; } } result.u ^= sign; return result.f; } <\/code><\/pre>\n<h3>\u0421\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u0435\u043b\u0438\u043c\u043e\u0433\u043e \u0438 \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0434\u0435\u043b\u0438\u043c\u043e\u0435 \u0440\u0430\u0432\u043d\u043e \u043d\u0443\u043b\u044e, \u043b\u0438\u0431\u043e \u0434\u0435\u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e, \u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043d\u043e\u043b\u044c.<br \/> \u0414\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u043d\u043e\u043b\u044c \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043d\u0435\u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e\u0441\u0442\u0438, \u043a\u0430\u043a\u0443\u044e \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c: \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0438\u043b\u0438 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e. \u0415\u0441\u043b\u0438 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0447\u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u2013 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u044c. \u041d\u043e \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u044b, \u0434\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430, \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c, \u0442\u043e \u043f\u0440\u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u043d\u0430 \u043d\u043e\u043b\u044c \u0431\u0443\u0434\u0435\u043c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0441\u0442\u044c.<br \/> \u0422\u043e\u0447\u043d\u043e \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u043c\u044b \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u043b\u0438 \u043f\u0440\u0438 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0438 \u2013 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0441 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u0440\u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0441\u0442\u044c.<br \/> \u041e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u043d\u0435\u0447\u0438\u0441\u043b\u0430\u043c\u0438 \u0442\u043e\u0436\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0441\u0442\u044c. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e, \u0447\u0442\u043e \u0441\u0440\u0430\u0437\u0443 \u0434\u0432\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442 \u043a \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c\u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0443: \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f \u0438\u043c\u0435\u0435\u0442 \u0432\u0438\u0434 00\u202600 \u0438\u043b\u0438 11\u202611. \u0411\u044b\u043b\u043e \u0431\u044b \u0443\u0434\u043e\u0431\u043d\u043e \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u044d\u0442\u0438 \u0434\u0432\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438. \u0415\u0441\u043b\u0438 \u043f\u0440\u0438\u0431\u0430\u0432\u0438\u0442\u044c \u043a \u043f\u043e\u0440\u044f\u0434\u043a\u0443 \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f 1, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043e\u0431\u043d\u0443\u043b\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043d\u043e\u0441, \u0442\u043e \u044d\u0442\u0438 \u0434\u0432\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0441\u0442\u0430\u043d\u0443\u0442 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u043c\u0438, \u0438 \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043e\u0434\u043d\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0435\u0439.<br \/> \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0451\u043d\u043d\u043e\u0433\u043e \u0434\u0435\u043b\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u0435\u043b\u0438\u043c\u043e\u0433\u043e \u0438 \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435, \u0438\u043c\u0435\u0435\u0442 \u0432\u0438\u0434:<\/p>\n<pre><code class=\"cpp\">float apprDiv(float xf, float yf) { Float x, y, result; x.f = xf; y.f = yf;  u32 xe = x.u &amp; EXP_MASK;  if((xe == EXP_MASK) | ((i32)((y.u + EXP_ONE) &amp; EXP_MASK) &lt;= EXP_ONE)) { result.u = INDEFINITE; return result.f; }  if(xe == 0) return 0;  u32 sign = (x.u ^ y.u) &amp; SIGN_MASK; i32 dif = (x.u - y.u) ^ sign; result.u = dif + EXP_BIAS; if(dif &lt; 0) { if((i32)(result.u - EXP_ONE) &lt; 0) { \/\/ \u0410\u043d\u0442\u0438\u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 (Underflow) return 0; } } else { if((i32)(result.u + EXP_ONE) &lt; 0) { \/\/ \u041f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 (Overflow) result.u = INDEFINITE; return result.f; } } result.u ^= sign; return result.f; } <\/code><\/pre>\n<h3>\u0414\u0435\u043b\u0435\u043d\u0438\u0435 \u0431\u0435\u0437 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u043e\u0432<\/h3>\n<p>\u041f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f, \u043c\u044b \u0443\u0436\u0435 \u0434\u0435\u043b\u0430\u043b\u0438 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f. \u041d\u043e\u0432\u043e\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f:<\/p>\n<pre><code class=\"cpp\">(i32)((y.u + EXP_ONE) &amp; EXP_MASK) &lt;= EXP_ONE <\/code><\/pre>\n<p>\u0427\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u0432 \u043d\u0435\u0439 \u043e\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f, \u0432\u044b\u0447\u0442\u0435\u043c \u0438\u0437 \u043e\u0431\u0435\u0438\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u043d\u0435\u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0443 \u0438\u0437 \u043f\u043e\u0440\u044f\u0434\u043a\u0430, \u0438 \u0435\u0449\u0451 1, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u0433\u043e\u0435 \u043d\u0435\u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e.<\/p>\n<pre><code class=\"cpp\">(i32)(((y.u + EXP_ONE) &amp; EXP_MASK) - EXP_ONE - 1) &lt; 0 <\/code><\/pre>\n<p>\u0418 \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0437\u0434\u0435\u0441\u044c \u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0431\u0438\u0442. \u0421\u0442\u0440\u043e\u0433\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u0432 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0439 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u0435 \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u0435, \u043a\u0430\u043a \u0438 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0437\u043d\u0430\u043a \u043d\u0435\u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u0430 \u2013 \u0438\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0446\u0435\u043b\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u044b \u043d\u0435 \u043d\u0430 \u043f\u0440\u044f\u043c\u043e\u0439, \u0430 \u043d\u0430 \u0437\u0430\u043c\u043a\u043d\u0443\u0442\u043e\u043c \u043a\u043e\u043b\u044c\u0446\u0435, \u0438 \u0441\u043b\u0435\u0434\u043e\u043c \u0437\u0430 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u043c \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0447\u0438\u0441\u043b\u043e\u043c \u0438\u0434\u0451\u0442 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435. \u041d\u043e \u0443 \u043d\u0430\u0441 \u0437\u043d\u0430\u043a \u043d\u0435\u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u043e \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0440\u0448\u0438\u0439 \u0431\u0438\u0442 \u0447\u0438\u0441\u043b\u0430 \u2013 \u043d\u0443\u043b\u0435\u0432\u043e\u0439.<\/p>\n<p>\u041f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0432 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0435 \u0432\u044b\u043a\u043b\u0430\u0434\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b \u0441\u043b\u0443\u0447\u0430\u044e \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f, \u0437\u0430\u043f\u0438\u0448\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0451\u043d\u043d\u043e\u0433\u043e \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0431\u0435\u0437 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u043e\u0432:<\/p>\n<pre><code class=\"cpp\">float apprDiv(float xf, float yf) { Float x, y, result; x.f = xf; y.f = yf;  u32 sign = (x.u ^ y.u) &amp; SIGN_MASK; i32 dif = (x.u - y.u) ^ sign; u32 t = dif + EXP_BIAS; result.u = t ^ sign; result.u = ifSign(dif, ifSign(t - EXP_ONE, 0, result.u), ifSign(t + EXP_ONE, INDEFINITE, result.u));  u32 xe = x.u &amp; EXP_MASK;  result.u = ifSign(xe + EXP_MASK, result.u, 0); result.u = ifSign((xe + EXP_ONE) | (((y.u + EXP_ONE) &amp; EXP_MASK) - EXP_ONE - 1), INDEFINITE, result.u);  return result.f; } <\/code><\/pre>\n<h2>\u0418\u0442\u043e\u0433\u043e\u0432\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430<\/h2>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0431\u0435\u0440\u0451\u043c \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435, \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432 \u043e\u0434\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435, \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u043a\u0430\u043a \u043e\u043d\u043e \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u043a\u043e\u043b\u043e\u043d\u043a\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0431\u0443\u0434\u0435\u043c \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0451\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<pre><code class=\"cpp\">#include &lt;stdio.h&gt; #include &lt;stdlib.h&gt;  typedef signed __int32 i32; typedef unsigned __int32 u32;  \/* \u0427\u0438\u0441\u043b\u043e \u043e\u0434\u0438\u043d\u0430\u0440\u043d\u043e\u0439 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0420\u0430\u0437\u043c\u0435\u0440: 32 \u0431\u0438\u0442\u0430 \u041c\u0430\u043d\u0442\u0438\u0441\u0441\u0430: 23 \u0431\u0438\u0442\u0430 \u041f\u043e\u0440\u044f\u0434\u043e\u043a: 8 \u0431\u0438\u0442\u043e\u0432 *\/  union Float { i32 i; u32 u; float f; };  #define BITS_PER_ALL32 #define BITS_PER_MANTISSA23  #define BIAS0x7F #define EXP_BIAS(BIAS &lt;&lt; BITS_PER_MANTISSA) #define EXP_ONE(1 &lt;&lt; BITS_PER_MANTISSA) #define EXP_MASK(0xFF &lt;&lt; BITS_PER_MANTISSA)  #define SIGN_MASK(1 &lt;&lt; (BITS_PER_ALL - 1))  #define INDEFINITE(SIGN_MASK | EXP_MASK | (1 &lt;&lt; (BITS_PER_MANTISSA - 1)))  \/\/ \u0415\u0441\u043b\u0438 expr &lt; 0, \u0442\u043e \u0432\u043e\u0437\u0440\u0430\u0449\u0430\u0435\u0442 ifTrue, \u0438\u043d\u0430\u0447\u0435 ifFalse inline u32 ifSign(i32 expr, u32 ifTrue, u32 ifFalse) { \/\/ \u0422\u0430\u043a \u043a\u0430\u043a expr - \u0437\u043d\u0430\u043a\u043e\u0432\u043e\u0435 \u0446\u0435\u043b\u043e\u0435, \u0442\u043e \u0441\u0434\u0432\u0438\u0433 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \/\/ \u0441 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u0437\u043d\u0430\u043a\u0430 return ((ifTrue ^ ifFalse) &amp; (expr &gt;&gt; (BITS_PER_ALL - 1))) ^ ifFalse; }  \/\/ \u041f\u0440\u0438\u0431\u043b\u0438\u0436\u0451\u043d\u043d\u043e\u0435 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 inline float apprMul(float xf, float yf) { Float x, y, result; x.f = xf; y.f = yf;  u32 sign = (x.u ^ y.u) &amp; SIGN_MASK; i32 sum = (x.u + y.u) ^ sign; u32 t = sum - EXP_BIAS; result.u = t ^ sign; result.u = ifSign(sum, ifSign(t + EXP_ONE, INDEFINITE, result.u), ifSign(t - EXP_ONE, 0, result.u));  u32 xe = x.u &amp; EXP_MASK; u32 ye = y.u &amp; EXP_MASK;  result.u = ifSign((xe + EXP_MASK) &amp; (ye + EXP_MASK), result.u, 0); result.u = ifSign((xe + EXP_ONE) | (ye + EXP_ONE), INDEFINITE, result.u);  return result.f; }  \/\/ \u041f\u0440\u0438\u0431\u043b\u0438\u0436\u0451\u043d\u043d\u043e\u0435 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 inline float apprOneDiv(float yf) { Float y, result; y.f = yf; result.u = (EXP_BIAS * 2) - y.u; return result.f; }  \/\/ \u041f\u0440\u0438\u0431\u043b\u0438\u0436\u0451\u043d\u043d\u043e\u0435 \u0434\u0435\u043b\u0435\u043d\u0438\u0435 inline float apprDiv(float xf, float yf) { Float x, y, result; x.f = xf; y.f = yf;  u32 sign = (x.u ^ y.u) &amp; SIGN_MASK; i32 dif = (x.u - y.u) ^ sign; u32 t = dif + EXP_BIAS; result.u = t ^ sign; result.u = ifSign(dif, ifSign(t - EXP_ONE, 0, result.u), ifSign(t + EXP_ONE, INDEFINITE, result.u));  u32 xe = x.u &amp; EXP_MASK;  result.u = ifSign(xe + EXP_MASK, result.u, 0); result.u = ifSign((xe + EXP_ONE) | (((y.u + EXP_ONE) &amp; EXP_MASK) - EXP_ONE - 1), INDEFINITE, result.u);  return result.f; }  \/\/ \u0421\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u043e\u0439 float frand() { Float result; result.u = (rand() &lt;&lt; 17) + (rand() &lt;&lt; 2); return result.f; }  int main() { FILE *fp = fopen(\"result.txt\", \"wt\");  float a, b;  fputs(\"\u0423\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435\\n\\n\", fp); for(int i = 0; i &lt; 20; i++) { a = frand(); b = frand(); float r = a * b; fprintf(fp, \"%14g * %14g = %14g %14g\\n\", a, b, r, apprMul(a, b)); }  fputs(\"\\n\\n\u041e\u0431\u0440\u0430\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\\n\\n\", fp); for(int i = 0; i &lt; 20; i++) { b = frand(); float r = 1 \/ b; fprintf(fp, \"1 \/ %14g = %14g %14g\\n\", b, r, apprOneDiv(b)); }  fputs(\"\\n\\n\u0414\u0435\u043b\u0435\u043d\u0438\u0435\\n\\n\", fp); for(int i = 0; i &lt; 20; i++) { a = frand(); b = frand(); float r = a \/ b; fprintf(fp, \"%14g \/ %14g = %14g %14g\\n\", a, b, r, apprDiv(a, b)); }  fclose(fp);  return 0; }  <\/code><\/pre>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b:<\/p>\n<pre><code>\u0423\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435     7.63402e-39 *    3.69062e-09 =              0              0   -7.87436e-26 *    6.11476e+15 =   -4.81498e-10   -4.37925e-10   -3.55394e+11 *    4.19839e-12 =       -1.49208       -1.44696   -1.69148e-06 *    4.40465e+08 =       -745.039       -724.228    7.45525e-25 *    3.16295e-16 =    2.35806e-40              0   -1.18709e+37 *    1.33413e-20 =   -1.58373e+17   -1.56388e+17    1.47492e-37 *   -4.66864e-34 =             -0              0   -2.92024e-23 *    2.54598e-13 =   -7.43489e-36   -7.36049e-36    1.82783e+31 *    3.82635e-30 =        69.9391        64.9598        -277719 *   -7.08136e-36 =    1.96663e-30    1.95008e-30   -5.51827e+19 *   -1.15262e+32 =            inf      -nan(ind)   -7.04335e-33 *    1.02665e+33 =       -7.23104        -6.8986   -4.19779e+17 *       -77663.9 =    3.26016e+22    3.10062e+22   -2.31285e+38 *   -9.18401e-22 =    2.12412e+17    2.08048e+17        666.378 *   -1.60581e+14 =   -1.07008e+17   -1.03944e+17    5.30878e+19 *   -1.25119e-11 =   -6.64231e+08   -6.22006e+08    1.42409e-37 *        20549.9 =    2.92649e-33    2.72499e-33   -2.09028e-25 *   -6.52706e+13 =    1.36434e-11    1.35762e-11    3.41468e+36 *      -0.223571 =   -7.63423e+35   -7.13149e+35    2.40725e+32 *      -0.285579 =   -6.87459e+31   -6.59542e+31   \u041e\u0431\u0440\u0430\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435  1 \/   -1.13102e-23 =    -8.8416e+22   -9.75343e+22 1 \/     -0.0103282 =       -96.8219       -107.391 1 \/   -8.62841e-28 =   -1.15896e+27   -1.19576e+27 1 \/    1.41866e-15 =    7.04891e+14    7.89668e+14 1 \/    2.08521e+27 =    4.79568e-28    5.31359e-28 1 \/   -2.65638e-36 =   -3.76452e+35   -4.10244e+35 1 \/        -3.5733 =      -0.279853      -0.303338 1 \/    6.93897e-13 =    1.44114e+12     1.6208e+12 1 \/    3.92333e+37 =    2.54885e-38      2.716e-38 1 \/   -3.79536e-08 =   -2.63479e+07   -2.89657e+07 1 \/    3.39831e-16 =    2.94264e+15    3.30911e+15 1 \/    4.15922e-17 =     2.4043e+16    2.70483e+16 1 \/   -3.26845e-09 =   -3.05956e+08   -3.34273e+08 1 \/    3.44574e+27 =    2.90213e-28    3.24789e-28 1 \/   -4.93606e+33 =   -2.02591e-34   -2.11602e-34 1 \/    2.60562e-15 =    3.83786e+14    4.31549e+14 1 \/   -2.33178e+11 =   -4.28857e-12   -4.74176e-12 1 \/    1.83613e-09 =    5.44624e+08    5.52156e+08 1 \/   -4.80367e+10 =   -2.08174e-11   -2.33114e-11 1 \/    5.85664e-15 =    1.70746e+14    1.90207e+14   \u0414\u0435\u043b\u0435\u043d\u0438\u0435     -0.00349138 \/        75334.4 =   -4.63451e-08   -4.88185e-08   -7.61755e-11 \/   -9.86817e-05 =    7.71931e-07    8.06753e-07    5.39424e-20 \/   -2.36491e+13 =   -2.28094e-33   -2.53579e-33   -2.57816e-36 \/    3.02153e+27 =             -0              0   -1.07626e+31 \/   -2.69156e-31 =            inf      -nan(ind)       3.16e+34 \/   -1.85275e+15 =   -1.70557e+19   -1.73022e+19    1.23307e+32 \/   -1.68849e+36 =   -7.30279e-05   -7.62692e-05     -0.0456871 \/    1.01003e-08 =   -4.52333e+06   -4.64034e+06   -1.25782e+14 \/   -5.48995e-39 =            inf      -nan(ind)    1.03812e-34 \/   -9.34649e-28 =    -1.1107e-07   -1.14501e-07   -3.98391e-34 \/   -4.60153e+14 =              0              0   -1.20124e-14 \/   -3.30396e+14 =    3.63575e-29    3.82891e-29    5.47548e-22 \/    1.55613e+10 =    3.51864e-32    3.65164e-32         772803 \/    2.53124e-17 =    3.05306e+22    3.11686e+22   -2.32844e+13 \/   -1.75253e-23 =    1.32861e+36    1.32882e+36        5.57153 \/    9.74577e-39 =            inf      -nan(ind)   -9.63453e+08 \/    1.73026e-06 =   -5.56827e+14   -5.57395e+14   -9.73926e-31 \/    2.12961e-21 =   -4.57325e-10   -4.60422e-10       -4.54288 \/   -3.04582e-32 =    1.49152e+32    1.54162e+32     1.2652e+29 \/   -1.08604e-08 =   -1.16496e+37   -1.21145e+37 <\/code><\/pre>\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\/906598\/\"> https:\/\/habr.com\/ru\/articles\/906598\/<\/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>\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0447\u0438\u0441\u0435\u043b \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u043e\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0451\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0430, \u0438, \u0437\u0430 \u0441\u0447\u0451\u0442 \u044d\u0442\u043e\u0433\u043e, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u0435. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u0442\u043e\u0447\u043d\u044b\u043c, \u043e\u0434\u043d\u0430\u043a\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u044b\u043c \u0442\u0430\u043c, \u0433\u0434\u0435 \u043e\u0441\u043e\u0431\u0430\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f.<\/p>\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0444\u043e\u0440\u043c\u0430\u0442 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0447\u0438\u0441\u0435\u043b float \u044f\u0437\u044b\u043a\u0430 C++, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c \u0441 \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u043c binary32 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 IEEE 754 &#8212; 2008 (IEEE Standard for Floating-Point Arithmetic).<br \/> \u0414\u043b\u044f \u043a\u0440\u0430\u0442\u043a\u043e\u0441\u0442\u0438, \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0442\u043e, \u0447\u0442\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u043f\u043e\u043b\u0435 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0447\u0438\u0441\u043b\u0430 \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u043e\u0439, \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u00ab\u043f\u043e\u0440\u044f\u0434\u043a\u043e\u043c\u00bb (Exponent), \u0430 \u0442\u043e, \u0447\u0442\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u043f\u043e\u043b\u0435 \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u044b \u2013 \u00ab\u043c\u0430\u043d\u0442\u0438\u0441\u0441\u043e\u0439\u00bb (Mantissa). \u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u2013 \u043d\u0435 \u0442\u043e, \u0447\u0442\u043e \u0432 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0434 \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u043e\u0439 \u0438 \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u043c. \u041d\u043e \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044d\u0442\u0438 \u0442\u0435\u0440\u043c\u0438\u043d\u044b \u043d\u0438 \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0443\u0442, \u0442\u043e \u043d\u0435\u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e\u0441\u0442\u0435\u0439 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c.<\/p>\n<h2>\u0423\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435<\/h2>\n<h3>\u0423\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b<\/h3>\n<p>\u0412 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 float \u0447\u0438\u0441\u043b\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 32 \u0431\u0438\u0442\u0430\u0445, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043c\u043b\u0430\u0434\u0448\u0438\u0435 23 \u0431\u0438\u0442\u0430 \u0445\u0440\u0430\u043d\u044f\u0442 \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u0443 M, \u043a \u043d\u0438\u043c \u043f\u0440\u0438\u043c\u044b\u043a\u0430\u044e\u0442 8 \u0431\u0438\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0445\u0440\u0430\u043d\u044f\u0442 \u043f\u043e\u0440\u044f\u0434\u043e\u043a E, \u0438 \u0441\u0430\u043c\u044b\u043c \u0441\u0442\u0430\u0440\u0448\u0438\u043c \u0431\u0438\u0442\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u0438\u0442 \u0437\u043d\u0430\u043a\u0430 S. \u0415\u0441\u043b\u0438 \u0431\u0438\u0442 \u0437\u043d\u0430\u043a\u0430 \u0440\u0430\u0432\u0435\u043d 1, \u0442\u043e \u0447\u0438\u0441\u043b\u043e \u2013 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435. \u041f\u043e\u043a\u0430 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043b\u0438\u0448\u044c \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u0438\u0442 \u0437\u043d\u0430\u043a\u0430 = 0. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u0440\u044f\u0434\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0441\u0442\u043e\u044f\u0442 \u0438\u0437 \u043d\u0443\u043b\u0435\u0432\u044b\u0445 \u0431\u0438\u0442\u043e\u0432, \u0438\u043b\u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u0437 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u0445, \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c\u0438, \u0438 \u043c\u044b \u0438\u0445 \u0442\u043e\u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u0437\u0434\u043d\u0435\u0435.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\n<\/th>\n<th>\n<p align=\"left\">\u0417\u043d\u0430\u043a<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u041f\u043e\u0440\u044f\u0434\u043e\u043a<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u041c\u0430\u043d\u0442\u0438\u0441\u0441\u0430<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/p>\n<\/td>\n<td>\n<p align=\"left\">S<\/p>\n<\/td>\n<td>\n<p align=\"left\">E<\/p>\n<\/td>\n<td>\n<p align=\"left\">M<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0420\u0430\u0437\u043c\u0435\u0440 \u0432 \u0431\u0438\u0442\u0430\u0445<\/p>\n<\/td>\n<td>\n<p align=\"left\">1<\/p>\n<\/td>\n<td>\n<p align=\"left\">8<\/p>\n<\/td>\n<td>\n<p align=\"left\">23<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041c\u0430\u043d\u0442\u0438\u0441\u0441\u0443 \u0443\u0434\u043e\u0431\u043d\u043e \u0434\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u0446\u0435\u043b\u0435\u0439 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0447\u0438\u0441\u043b\u043e \u0441 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u043e\u0439, \u043f\u0440\u0438\u0447\u0451\u043c \u044d\u0442\u0430 \u0442\u043e\u0447\u043a\u0430 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0430 \u0441\u0440\u0430\u0437\u0443 \u0441\u043b\u0435\u0432\u0430 \u043e\u0442 \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u044b. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0435\u0441\u043b\u0438 \u0441\u0430\u043c\u044b\u0439 \u0441\u0442\u0430\u0440\u0448\u0438\u0439 \u0431\u0438\u0442 \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u044b \u0445\u0440\u0430\u043d\u0438\u0442 1, \u0442\u043e \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u0430 M = 0.5<br \/> \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u043d\u0435\u043a\u043e\u0435 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e r &gt; 0 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0432\u0438\u0434\u0435:<\/p>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u043f\u0443\u0441\u0442\u044c <br \/> \u041d\u0438\u0436\u043d\u0438\u043c\u0438 \u043f\u043e\u043b\u0443\u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u043c\u0438 \u0441\u043a\u043e\u0431\u043a\u0430\u043c\u0438  \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u0447\u0438\u0441\u043b\u0430 x \u0432\u043d\u0438\u0437 \u0434\u043e \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0433\u043e \u0446\u0435\u043b\u043e\u0433\u043e. \u0414\u043b\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e x \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e \u0442\u043e\u0436\u0434\u0435\u0441\u0442\u0432\u043e:<br \/> , \u0433\u0434\u0435 \u0434\u0440\u043e\u0431\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0447\u0438\u0441\u043b\u0430: <\/p>\n<p>\u0420\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0435\u043c m:<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043c\u044b \u0445\u0440\u0430\u043d\u0438\u043c \u0447\u0438\u0441\u043b\u043e r \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 float, \u0442\u043e \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f:<br \/> \u041c\u0430\u043d\u0442\u0438\u0441\u0441\u0430 M = m &#8212; 1<br \/> \u041f\u043e\u0440\u044f\u0434\u043e\u043a E = P + BIAS, \u0433\u0434\u0435 BIAS \u2013 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0444\u043e\u0440\u043c\u0430\u0442\u0430. \u0414\u043b\u044f \u0444\u043e\u0440\u043c\u0430\u0442\u0430 float: BIAS = 0x7F = 127<br \/> \u0412\u044b\u0440\u0430\u0437\u0438\u043c r \u0447\u0435\u0440\u0435\u0437 \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u0443 \u0438 \u043f\u043e\u0440\u044f\u0434\u043e\u043a:<\/p>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c:<\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u0432\u0430 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0447\u0438\u0441\u043b\u0430: x &gt; 0 \u0438 y &gt; 0. \u0412\u044b\u0440\u0430\u0437\u0438\u043c \u0438\u0445 \u0447\u0435\u0440\u0435\u0437 \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u044b \u0438 \u043f\u043e\u0440\u044f\u0434\u043a\u0438:<\/p>\n<p>\u041a\u0430\u043a \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e \u0438\u0437 \u0430\u043b\u0433\u0435\u0431\u0440\u044b, \u0434\u043b\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e:<\/p>\n<p>\u041f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0441\u044e\u0434\u0430 \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u044b \u0438 \u043f\u043e\u0440\u044f\u0434\u043a\u0438:<\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u044b \u0432 \u043d\u0430\u0448\u0435\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435 , \u0442\u043e \u043d\u0430\u0439\u0434\u0451\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438  \u043d\u0430 \u043e\u0431\u043e\u0438\u0445 \u043a\u043e\u043d\u0446\u0430\u0445 \u044d\u0442\u043e\u0433\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430:<\/p>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u0430 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438  \u043d\u0430 \u043e\u0431\u043e\u0438\u0445 \u043a\u043e\u043d\u0446\u0430\u0445 \u0441\u0432\u043e\u0435\u0433\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u0435\u0439 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435:<\/p>\n<p>\u041e\u0446\u0435\u043d\u0438\u043c \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u0439\u0434\u0451\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 M, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u0448\u0438\u043c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 . \u0420\u0435\u0448\u0438\u0432 \u0435\u0433\u043e, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c, \u0447\u0442\u043e \u044d\u043a\u0441\u0442\u0440\u0435\u043c\u0443\u043c \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 . \u0412 \u044d\u0442\u043e\u0439 \u0442\u043e\u0447\u043a\u0435 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0432\u043d\u043e 0.086, \u0447\u0442\u043e \u043d\u0435 \u0442\u0430\u043a \u0443\u0436 \u0438 \u043c\u043d\u043e\u0433\u043e.<br \/> \u041f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u043d\u0430\u0448\u0443 \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u044e \u0432 \u0444\u043e\u0440\u043c\u0443\u043b\u0443 \u0434\u043b\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f:<\/p>\n<p>\u041e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043c . \u041f\u043e\u0440\u044f\u0434\u043e\u043a \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u0435\u043d:<\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u0430 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f , \u0442\u043e \u0441\u0443\u043c\u043c\u0430 \u0434\u0432\u0443\u0445 \u043c\u0430\u043d\u0442\u0438\u0441\u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0432 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0435 . \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u0432\u0430 \u0441\u043b\u0443\u0447\u0430\u044f.<br \/> \u0421\u043b\u0443\u0447\u0430\u0439 1: <br \/> \u041e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u0432\u043d\u0438\u0437 \u0441\u0443\u043c\u043c\u044b \u043e\u0431\u043d\u0443\u043b\u0438\u0442\u0441\u044f: <br \/> \u0422\u043e\u0433\u0434\u0430 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f: <br \/> \u0421\u043b\u0443\u0447\u0430\u0439 2: <br \/> \u041e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u0432\u043d\u0438\u0437 \u0441\u0443\u043c\u043c\u044b: <br \/> \u0422\u043e\u0433\u0434\u0430 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f: <br \/> \u0418 \u0437\u0434\u0435\u0441\u044c \u043d\u0443\u0436\u043d\u043e \u0443\u0447\u0435\u0441\u0442\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0443\u0434\u0430\u0447\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0435\u0439 \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u044b \u0438 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 float. \u0415\u0441\u043b\u0438 \u043c\u044b \u0441\u043b\u043e\u0436\u0438\u043c \u0434\u0432\u0430 \u0442\u0430\u043a\u0438\u0445 \u0447\u0438\u0441\u043b\u0430, \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u043e \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u044f \u0438\u0445 \u043a\u0430\u043a \u0446\u0435\u043b\u044b\u0435 \u0447\u0438\u0441\u043b\u0430, \u0442\u043e \u0435\u0441\u043b\u0438 \u043f\u0440\u0438 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043c\u0430\u043d\u0442\u0438\u0441\u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0431\u0443\u0434\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 1, \u0442\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442 \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u0435\u0434\u0438\u043d\u0438\u0446\u044b \u0432 \u043f\u043e\u043b\u0435 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430. \u0422\u043e \u0435\u0441\u0442\u044c, \u043d\u0430\u043c, \u043f\u043e \u0441\u0443\u0442\u0438 \u0434\u0435\u043b\u0430, \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e: \u043e\u0431\u0430 \u0441\u043b\u0443\u0447\u0430\u044f \u0441\u0443\u043c\u043c\u044b \u043c\u0430\u043d\u0442\u0438\u0441\u0441 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c.<br \/> \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0439\u0434\u0451\u043c \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u0443 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f. \u041a\u0430\u043a \u043c\u044b \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438:<\/p>\n<p>\u041f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0441\u044e\u0434\u0430 \u043d\u0430\u0448\u0443 \u0430\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0430\u0446\u0438\u044e:<\/p>\n<p>\u0422\u043e\u0433\u0434\u0430:<\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a  \u0438 BIAS \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u0446\u0435\u043b\u044b\u0435 \u0447\u0438\u0441\u043b\u0430, \u0442\u043e \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u0438\u0437 \u0432\u0437\u044f\u0442\u0438\u044f \u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438. \u041e\u0441\u0442\u0430\u0451\u0442\u0441\u044f:<\/p>\n<p>\u0414\u043b\u044f \u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e \u043d\u0435\u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e: . \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430\u0448\u0443 \u0430\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0430\u0446\u0438\u044e:<\/p>\n<p>\u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f:<\/p>\n<p>\u0414\u0440\u043e\u0431\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043e\u0442 \u0441\u0443\u043c\u043c\u044b \u043c\u0430\u043d\u0442\u0438\u0441\u0441 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u0442\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u0432\u0441\u0435 \u0431\u0438\u0442\u044b \u0441\u0443\u043c\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u043b\u0435\u0437\u043b\u0438 \u0437\u0430 \u043f\u043e\u043b\u0435 \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u044b.<br \/> \u0418\u0442\u0430\u043a, \u0443\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0444\u043e\u0440\u043c\u0443\u043b\u044b \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0451\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f, \u0441 \u0442\u043e\u0439 \u043e\u0433\u043e\u0432\u043e\u0440\u043a\u043e\u0439, \u0447\u0442\u043e \u043c\u044b \u043f\u043e\u043a\u0430 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u043b\u0443\u0447\u0430\u0438 \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438:<\/p>\n<pre><code class=\"cpp\">typedef signed __int32 i32; typedef unsigned __int32 u32;  \/* \u0427\u0438\u0441\u043b\u043e \u043e\u0434\u0438\u043d\u0430\u0440\u043d\u043e\u0439 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0420\u0430\u0437\u043c\u0435\u0440: 32 \u0431\u0438\u0442\u0430 \u041c\u0430\u043d\u0442\u0438\u0441\u0441\u0430: 23 \u0431\u0438\u0442\u0430 \u041f\u043e\u0440\u044f\u0434\u043e\u043a: 8 \u0431\u0438\u0442\u043e\u0432 *\/  union Float { i32 i; u32 u; float f; };  #define BITS_PER_ALL32 #define BITS_PER_MANTISSA23  #define BIAS0x7F #define EXP_BIAS(BIAS &lt;&lt; BITS_PER_MANTISSA) #define EXP_ONE(1 &lt;&lt; BITS_PER_MANTISSA) #define EXP_MASK(0xFF &lt;&lt; BITS_PER_MANTISSA)  #define SIGN_MASK(1 &lt;&lt; (BITS_PER_ALL - 1))  \/\/ \u041f\u0440\u0438\u0431\u043b\u0438\u0436\u0451\u043d\u043d\u043e\u0435 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 float apprMul(float xf, float yf) { Float x, y, result; x.f = xf; y.f = yf; result.u = x.u + y.u - EXP_BIAS; return result.f; } <\/code><\/pre>\n<h3>\u0423\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043e\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438. \u0411\u0438\u0442 \u0437\u043d\u0430\u043a\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e XOR \u0431\u0438\u0442\u043e\u0432 \u0437\u043d\u0430\u043a\u0430 \u0441\u043e\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0435\u0439. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0435\u0441\u043b\u0438 \u043c\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c XOR \u0441\u043e\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0435\u0439 \u0446\u0435\u043b\u0438\u043a\u043e\u043c, \u043a\u0430\u043a \u0435\u0441\u043b\u0438 \u0431\u044b \u043e\u043d\u0438 \u0431\u044b\u043b\u0438 \u0446\u0435\u043b\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438, \u0442\u043e \u0441\u0442\u0430\u0440\u0448\u0438\u0439 \u0431\u0438\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u044d\u0442\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u0435\u043d \u0437\u043d\u0430\u043a\u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f.<br \/> \u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u0441\u0443\u043c\u043c\u0438\u0440\u0443\u0435\u043c \u0434\u0432\u0430 \u0431\u0438\u0442\u0430, \u0442\u043e \u043c\u043b\u0430\u0434\u0448\u0438\u0439 \u0431\u0438\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0442\u043e\u0436\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 XOR \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0445.<br \/> \u0421\u043f\u0440\u0430\u0432\u0430 \u043e\u0442 \u043f\u043e\u043b\u044f \u0437\u043d\u0430\u043a\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e\u043b\u0435 \u043f\u043e\u0440\u044f\u0434\u043a\u0430. \u041c\u044b \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043a \u043f\u043e\u043b\u044e \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0447\u0438\u0441\u043b\u043e, \u0437\u0430\u0442\u0435\u043c \u0435\u0449\u0451 \u043e\u0434\u043d\u043e \u0447\u0438\u0441\u043b\u043e \u043e\u0442\u043d\u0438\u043c\u0430\u0435\u043c. \u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u0438\u0445 \u0434\u0432\u0443\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u043e \u043d\u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430, \u043d\u0438 \u0437\u0430\u0451\u043c\u0430, \u0442\u043e \u0431\u0438\u0442 \u0437\u043d\u0430\u043a\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u043a\u0430\u043a \u0441\u0443\u043c\u043c\u0443 \u0431\u0438\u0442\u043e\u0432 \u0437\u043d\u0430\u043a\u043e\u0432 \u0441\u043e\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0435\u0439. \u0422\u043e \u0435\u0441\u0442\u044c, \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0451\u043d\u043d\u043e\u0433\u043e \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0443\u0436\u0435 \u0432\u044b\u0432\u0435\u043b\u0438 \u0434\u043b\u044f \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u043e\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0435\u0439, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0438 \u0434\u043b\u044f \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445, \u0431\u0435\u0437 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439.<\/p>\n<h3>\u0410\u043d\u0442\u0438\u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 (Underflow)<\/h3>\n<p>\u041a\u0430\u043a \u043c\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u0438, \u043f\u0440\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u0445 \u0441 \u043f\u043e\u043b\u0435\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u0439\u0442\u0438 \u0437\u0430 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d. \u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u0430\u043d\u0442\u0438\u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u042d\u0442\u0430 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438 \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u0438 \u0438\u0437 \u0441\u0443\u043c\u043c\u044b \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b BIAS \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043c\u0435\u043d\u044c\u0448\u0435, \u043b\u0438\u0431\u043e \u0440\u0430\u0432\u0435\u043d \u043d\u0443\u043b\u044e. \u0420\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e \u043d\u0443\u043b\u044e \u0442\u043e\u0436\u0435 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043a \u0430\u043d\u0442\u0438\u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0443\u043b\u0435\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044f \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0437\u0430\u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0434\u043b\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.<br \/> \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0430\u043d\u0442\u0438\u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u0431\u043d\u0443\u043b\u044f\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u0414\u0435\u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c, \u0442\u0430\u043a \u043a\u0430\u043a \u0443 \u043d\u0430\u0441 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0435\u0442\u043e\u0447\u043d\u043e\u0435. \u041e\u0431\u044b\u0447\u043d\u043e, \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u0435\u043f\u0435\u043d\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442 \u0430\u043d\u0442\u0438\u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435, \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u044c \u0434\u0432\u0443\u0445 \u043e\u0447\u0435\u043d\u044c \u0431\u043b\u0438\u0437\u043a\u0438\u0445 \u0447\u0438\u0441\u0435\u043b. \u0422\u0430\u043a \u0447\u0442\u043e \u043e\u0431\u043d\u0443\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0432 \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0432\u043f\u043e\u043b\u043d\u0435 \u043e\u043f\u0440\u0430\u0432\u0434\u0430\u043d\u043e: \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0438 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043d\u043e\u043b\u044c.<br \/> \u041f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u043c \u0430\u043d\u0442\u0438\u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f: \u043f\u043e\u0441\u043b\u0435 \u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0435 \u0431\u044b\u043b\u043e (\u0442\u043e \u0435\u0441\u0442\u044c, \u0431\u0438\u0442 \u0437\u043d\u0430\u043a\u0430 \u043d\u0435 \u043f\u043e\u0432\u0440\u0435\u0436\u0434\u0451\u043d), \u043e\u0434\u043d\u0430\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b BIAS \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u0451\u043b \u0437\u0430\u0451\u043c \u0438\u0437 \u043f\u043e\u043b\u044f \u0437\u043d\u0430\u043a\u0430, \u043b\u0438\u0431\u043e \u043f\u043e\u043b\u0435 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u043e\u0431\u043d\u0443\u043b\u0438\u043b\u043e\u0441\u044c.<br \/> \u0411\u0438\u0442 \u0437\u043d\u0430\u043a\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0437\u043d\u0430\u043a \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c, \u043c\u044b \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u043e \u043d\u0430\u0439\u0434\u0451\u043c \u0435\u0433\u043e \u0447\u0435\u0440\u0435\u0437 XOR \u0441\u043e\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0435\u0439, \u0438 \u043f\u0440\u043e\u043a\u0441\u043e\u0440\u0438\u043c \u0435\u0433\u043e \u0441 \u0441\u0443\u043c\u043c\u043e\u0439 \u0441\u043e\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0435\u0439.<br \/> \u0427\u0442\u043e\u0431\u044b \u0432\u043c\u0435\u0441\u0442\u043e \u0434\u0432\u0443\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u0443, \u043c\u044b \u0432\u044b\u0447\u0442\u0435\u043c \u0438\u0437 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0443. \u042d\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442 \u0437\u0430\u0451\u043c \u043b\u0438\u0448\u044c \u0432 \u0434\u0432\u0443\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445: \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u0435 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0431\u044b\u043b\u043e \u0440\u0430\u0432\u043d\u043e 0 \u2013 \u0442\u043e\u0433\u0434\u0430 \u0437\u0430\u0451\u043c \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f, \u0447\u0442\u043e \u043d\u0430\u043c \u0438 \u043d\u0443\u0436\u043d\u043e, \u0438 \u043a\u043e\u0433\u0434\u0430 \u0441\u0443\u043c\u043c\u0430 \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432 \u0431\u044b\u043b\u0430 \u0442\u0430\u043a\u043e\u0439 \u0431\u043e\u043b\u044c\u0448\u043e\u0439, \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u044f BIAS \u0438\u043c\u0435\u043b\u0430 \u0432\u0438\u0434 \u0432 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438: 100\u202600, \u043f\u0440\u0438\u0447\u0451\u043c \u0441\u0442\u0430\u0440\u0448\u0438\u0439 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u0439 \u0431\u0438\u0442 \u043f\u043e\u043f\u0430\u0434\u0430\u043b \u0432 \u043f\u043e\u043b\u0435 \u0437\u043d\u0430\u043a\u0430. \u041e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u0430 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u0435\u043b\u0430\u0435\u0442 \u043b\u043e\u0436\u043d\u043e\u0439 \u043d\u0430\u0448\u0443 \u043f\u0435\u0440\u0432\u0443\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443: \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0434\u043e \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u044f, \u0442\u0430\u043a \u0447\u0442\u043e \u0432 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043c\u044b \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0442\u0435\u0440\u044f\u0435\u043c.<br \/> \u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u0430\u043c\u043e\u0433\u043e \u0441\u0442\u0430\u0440\u0448\u0435\u0433\u043e \u0431\u0438\u0442\u0430, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0447\u0438\u0441\u043b\u043e \u043d\u0430 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u043a\u0430\u043a \u0435\u0441\u043b\u0438 \u0431\u044b \u043e\u043d\u043e \u0431\u044b\u043b\u043e \u0437\u043d\u0430\u043a\u043e\u0432\u044b\u043c \u0446\u0435\u043b\u044b\u043c. \u0423 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0441\u0430\u043c\u044b\u0439 \u0441\u0442\u0430\u0440\u0448\u0438\u0439 \u0431\u0438\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0432 1.<br \/> \u041d\u0430\u0448 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0442\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u0438\u0434:<\/p>\n<pre><code class=\"cpp\">\/\/ \u041f\u0440\u0438\u0431\u043b\u0438\u0436\u0451\u043d\u043d\u043e\u0435 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 float apprMul(float xf, float yf) { Float x, y, result; x.f = xf; y.f = yf; u32 sign = (x.u ^ y.u) &amp; SIGN_MASK; i32 sum = (x.u + y.u) ^ sign; result.u = sum - EXP_BIAS; if(sum &gt;= 0 &amp;&amp; (i32)(result.u - EXP_ONE) &lt; 0) { return 0; } result.u ^= sign; return result.f; } <\/code><\/pre>\n<h3>\u041f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 (Overflow)<\/h3>\n<p>\u041f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442, \u0435\u0441\u043b\u0438 \u0434\u043e \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b BIAS \u0431\u044b\u043b \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u0432 \u043f\u043e\u043b\u0435 \u0437\u043d\u0430\u043a\u0430, \u0438 \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u0435 \u044d\u0442\u043e \u043d\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043b\u043e. \u041b\u0438\u0431\u043e \u0435\u0441\u043b\u0438 \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u0435 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u0445 \u0431\u0438\u0442\u043e\u0432 \u2013 \u044d\u0442\u043e \u0437\u0430\u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0434\u043b\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.<br \/> \u041f\u0440\u0438 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u043c\u0435\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0441\u0442\u0435\u043f\u0435\u043d\u044c, \u0438 \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u0438\u0441\u043a\u0443\u0448\u0435\u043d\u0438\u0435 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u044c. \u041e\u0434\u043d\u0430\u043a\u043e \u0442\u0430\u043a \u0434\u0435\u043b\u0430\u0442\u044c \u043e\u043f\u0430\u0441\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044d\u0442\u043e \u2013 \u043d\u0435 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0430\u044f \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u044c. \u0415\u0441\u043b\u0438 \u043c\u044b \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u043c\u043d\u043e\u0436\u0438\u043b\u0438 \u0447\u0438\u0441\u043b\u043e \u043d\u0430 2, \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0447\u0435\u0433\u043e \u043e\u043d\u043e \u0432\u044b\u0448\u043b\u043e \u0437\u0430 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043f\u043e\u0434\u0435\u043b\u0438\u043b\u0438 \u043d\u0430 4 (\u0438\u043d\u0430\u0447\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, \u0443\u043c\u043d\u043e\u0436\u0438\u043b\u0438 \u043d\u0430 0.25), \u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c\u044b\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d. \u041e\u0434\u043d\u0430\u043a\u043e \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043d\u0430 4 \u0442\u0430\u043a \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0435\u0435 \u0438\u0437\u0431\u0435\u0433\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0447\u0435\u043c \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c.<br \/> \u0414\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430, \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0441\u0442\u044c.<br \/> \u041d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0441\u0442\u044c (Indefinite) \u2013 \u044d\u0442\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432 \u043f\u043e\u043b\u044f\u0445 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0438 \u0437\u043d\u0430\u043a\u0430 \u0438\u043c\u0435\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u0435 \u0431\u0438\u0442\u044b, \u0432 \u043f\u043e\u043b\u0435 \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u044b \u0438\u043c\u0435\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c \u0432 1 \u0441\u0430\u043c\u044b\u0439 \u0441\u0442\u0430\u0440\u0448\u0438\u0439 \u0431\u0438\u0442, \u0430 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0431\u0438\u0442\u044b \u2013 \u043d\u0443\u043b\u0435\u0432\u044b\u0435. \u0424\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e, \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0441\u0442\u044c \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043a \u00ab\u0442\u0438\u0445\u0438\u043c\u00bb \u043d\u0435\u0447\u0438\u0441\u043b\u0430\u043c (QNAN) \u2013 \u0442\u043e \u0435\u0441\u0442\u044c, \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439.<br \/> \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0441\u043b\u0443\u0447\u0430\u044e \u0430\u043d\u0442\u0438\u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u0441\u0432\u0435\u0441\u0442\u0438 \u0434\u0432\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u043e\u043b\u044f \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u043a \u043e\u0434\u043d\u043e\u0439, \u043c\u044b \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u0431\u0430\u0432\u0438\u043c \u043a \u043f\u043e\u0440\u044f\u0434\u043a\u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 1. \u042d\u0442\u043e \u0432\u044b\u0437\u043e\u0432\u0435\u0442 \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u0432 \u043f\u043e\u043b\u0435 \u0437\u043d\u0430\u043a\u0430, \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u0435 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043b\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u0435\u0434\u0438\u043d\u0438\u0446. \u0412\u0442\u043e\u0440\u043e\u0439 \u0441\u043b\u0443\u0447\u0430\u0439, \u043a\u043e\u0433\u0434\u0430 \u0431\u0438\u0442 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430 \u0441\u0431\u0440\u043e\u0441\u0438\u0442\u0441\u044f \u0432 0, \u0432\u043e\u0437\u043c\u043e\u0436\u0435\u043d \u043b\u0438\u0448\u044c \u0442\u043e\u0433\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u0434\u043e \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u044f BIAS \u0441\u0443\u043c\u043c\u0430 \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432 \u0431\u044b\u043b\u0430 \u0440\u0430\u0432\u043d\u0430 126 = 0x7E, \u043e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0432\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439.<br \/> \u0422\u0435\u043f\u0435\u0440\u044c \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"cpp\">\/\/ \u041d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0441\u0442\u044c #define INDEFINITE(SIGN_MASK | EXP_MASK | (1 &lt;&lt; (BITS_PER_MANTISSA - 1)))  \/\/ \u041f\u0440\u0438\u0431\u043b\u0438\u0436\u0451\u043d\u043d\u043e\u0435 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 float<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-458483","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/458483","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=458483"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/458483\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=458483"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=458483"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=458483"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}