{"id":378544,"date":"2024-06-10T15:00:42","date_gmt":"2024-06-10T15:00:42","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=378544"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=378544","title":{"rendered":"<span>\u0411\u044b\u0441\u0442\u0440\u043e\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u0435\u043f\u0435\u043d\u0438<\/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>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 <a href=\"https:\/\/habr.com\/ru\/companies\/infopulse\/articles\/336110\/\" rel=\"noopener noreferrer nofollow\">\u00ab\u00ab\u041c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430\u00bb 0x5f3759df\u00bb<\/a> \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u0440\u043d\u044f, \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u00ab\u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b\u00bb, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0435\u0451 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0432 \u0446\u0435\u043b\u044f\u0445 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0447\u0438\u0441\u0435\u043b \u0432 \u043b\u044e\u0431\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438. \u0411\u044b\u043b\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0430 \u043d\u043e\u0432\u0430\u044f \u00ab\u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430\u00bb \u0438 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u043e \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0441 \u0435\u0451 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u043a\u0430\u0436\u0443 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043b\u044e\u0431\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0439 \u043d\u043e\u0432\u0443\u044e \u00ab\u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443\u00bb. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0435\u0451 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u0440\u043d\u044f, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u0438 Math.Pow.<\/p>\n<h2>\u041d\u0430 \u0437\u0430\u0442\u0440\u0430\u0432\u043a\u0443   <\/h2>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430 \u043f\u044f\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439: <\/p>\n<p>&#8212;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439;<\/p>\n<p>&#8212;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0446\u0435\u043b\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430;<\/p>\n<p>&#8212;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u044f \u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u0438;<\/p>\n<p>&#8212;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u0438;<\/p>\n<p>&#8212;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u043f\u0435\u0440\u0435\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0446\u0435\u043b\u043e\u0439 \u0438 \u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0435\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430.<\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u0440\u043d\u044f.<\/p>\n<pre><code class=\"cs\">    float FastInvSqrt(float x) {         float xhalf = 0.5f * x;         int i = *(int*)&amp;x;  \/\/ \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0431\u0438\u0442\u044b float \u0432 \u0432\u0438\u0434\u0435 \u0446\u0435\u043b\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430         i = 0x5f3759df - (i >> 1);  \/\/ \u043a\u0430\u043a\u043e\u0433\u043e \u0447\u0435\u0440\u0442\u0430 \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 ?         x = *(float*)&amp;i;         x = x*(1.5f-(xhalf*x*x));         return x;     }<\/code><\/pre>\n<p>\u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0434\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430, \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e. \u0425\u043e\u0442\u044f, \u0441\u0442\u0440\u043e\u0433\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u0433\u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430, \u0430 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043e\u0441\u043d\u043e\u0432\u0430 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u00ab\u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430\u00bb <strong>0x5f3759df<\/strong> \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u043d\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <strong>+1<\/strong>.<\/p>\n<p>\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0446\u0435\u043b\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0432 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0435 \u043d\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e, \u0437\u0430 \u043d\u0435\u0438\u043c\u0435\u043d\u0438\u0435\u043c \u0442\u0430\u043a\u043e\u0432\u043e\u0439 \u0434\u043b\u044f <strong>P\u00a0=\u00a0-1\/2<\/strong>.<\/p>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0432\u044b\u0448\u0435\u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u043e\u0433\u043e \u00ab\u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430\u00bb.<\/p>\n<p>\u0418 \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043c\u0435\u0442\u043e\u0434\u0430 \u041d\u044c\u044e\u0442\u043e\u043d\u0430. \u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0434\u0438\u0438, \u0437\u0430 \u043d\u0435\u0438\u043c\u0435\u043d\u0438\u0435\u043c \u0446\u0435\u043b\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u0438 <strong>P<\/strong>, \u043a\u0430\u043a \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u043e\u0441\u044c \u0432\u044b\u0448\u0435.<\/p>\n<h2>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u00ab\u0441\u0432\u043e\u0439 \u041b\u0443\u043d\u0430\u043f\u0430\u0440\u043a\u00bb   <\/h2>\n<p>\u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c\u0441\u044f \u0441 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043a \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c. \u0418\u0441\u043a\u043e\u043c\u0430\u044f \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u043c\u0435\u0435\u0442 \u0432\u0438\u0434<\/p>\n<p><strong>Y\u00a0=\u00a0X<sup>P<\/sup><\/strong><\/p>\n<p>\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0441\u0442\u0435\u043f\u0435\u043d\u0438 <strong>P<\/strong> \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b <strong>R<\/strong>. \u041e\u0434\u043d\u0430\u043a\u043e, \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 <strong>\u0425<\/strong> \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 <strong>P<\/strong>. \u041f\u0440\u0438 <strong>P<\/strong>, \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0449\u0435\u043c\u0443 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0443 \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b <strong>Z<\/strong>, <strong>\u0425\u00a0\u0404\u00a0(-\u221e;\u00a0+\u221e)<\/strong>. \u041d\u043e \u0434\u043b\u044f \u043f\u0440\u043e\u0447\u0438\u0445 <strong>P<\/strong> \u0438\u0437 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430\u00a0<strong>R<\/strong>, \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 <strong>X<\/strong> \u0441\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u0434\u043e <strong>(0;\u00a0+\u221e)<\/strong>. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438, \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0449\u0438\u0445 \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u0431\u0443\u0434\u0435\u0442 <strong>float.NaN<\/strong> \u2013 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u043e\u0433 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043f\u0440\u0438 <strong>P\u00a0=\u00a00<\/strong> \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 <strong>\u0425<\/strong> \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 <strong>1<\/strong>, \u0438 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0435 \u0440\u0430\u0441\u0447\u0451\u0442\u044b \u043d\u0435 \u0438\u043c\u0435\u044e\u0442 \u0441\u043c\u044b\u0441\u043b\u0430. \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e, \u043f\u0440\u0438 <strong>P\u00a0=\u00a01<\/strong> \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 <strong>X<\/strong>.<\/p>\n<p>\u041e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 <strong>X\u00a0=\u00a00<\/strong>. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0434\u043b\u044f \u043b\u044e\u0431\u044b\u0445 <strong>P\u00a0&lt;\u00a00 <\/strong>\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u044b\u043c. \u0412 \u0434\u0435\u0431\u0440\u044f\u0445 \u043c\u0430\u0442\u0430\u043d\u0430 \u0438 \u0444\u0443\u043d\u043a\u0430\u043d\u0430 \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043f\u043e\u0441\u044b\u043b \u0441\u0432\u043e\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439, \u043f\u043e \u044d\u0442\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0432\u043e\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f <strong>0<\/strong> \u0432 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <strong>float.PositiveInfinity<\/strong>, \u0442\u043e \u0435\u0441\u0442\u044c <strong>+\u221e<\/strong>.<\/p>\n<p>\u041f\u0440\u0438 <strong>X\u00a0=\u00a00<\/strong> \u0434\u043b\u044f <strong>P\u00a0>\u00a00<\/strong> \u0434\u0435\u043b\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0449\u0435, \u0438 \u0437\u0434\u0435\u0441\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u043c <strong>0<\/strong>.<\/p>\n<p>\u0423\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0432\u044b\u0448\u0435\u0438\u0437\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0435, \u044f \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 (\u0438 \u043e\u0434\u043d\u043e \u0432 \u0442\u0435\u043b\u0435) \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<p>&#8212;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 <strong>1<\/strong> \u043f\u0440\u0438 <strong>P\u00a0=\u00a00<\/strong>;<\/p>\n<p>&#8212;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 <strong>X<\/strong> \u043f\u0440\u0438 <strong>P\u00a0=\u00a01<\/strong>;<\/p>\n<p>&#8212;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 <strong>float.PositiveInfinity<\/strong> \u043f\u0440\u0438 <strong>X\u00a0=\u00a00<\/strong> \u0438 <strong>P\u00a0&lt;\u00a00<\/strong>;<\/p>\n<p>&#8212;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 <strong>0<\/strong> \u043f\u0440\u0438 <strong>X\u00a0=\u00a00<\/strong> \u0438 <strong>P\u00a0>\u00a00<\/strong>;<\/p>\n<p>&#8212;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 <strong>float.NaN<\/strong> \u043f\u0440\u0438 <strong>X\u00a0&lt;\u00a00<\/strong> \u0434\u043b\u044f \u0432\u0441\u0435\u0445 <strong>P<\/strong>, \u043d\u0435 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0449\u0438\u0445 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0443 \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b <strong>Z<\/strong>.<\/p>\n<p>\u0412 \u0445\u043e\u0434\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0440\u0430\u0441\u0447\u0451\u0442\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0434\u0432\u0443\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u044f <strong>P\u00a0>\u00a00<\/strong> \u0438 <strong>P\u00a0&lt;\u00a00<\/strong>. \u041e\u0431 \u044d\u0442\u043e\u043c \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0434\u0430\u043b\u0435\u0435.<\/p>\n<p>\u00a0\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u044d\u0442\u0430\u043f\u043e\u043c, \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043c \u0441\u0442\u0435\u043f\u0435\u043d\u044c <strong>P<\/strong> \u043d\u0430 \u0446\u0435\u043b\u0443\u044e \u0447\u0430\u0441\u0442\u044c <strong>c<\/strong> \u0438 \u0434\u0440\u043e\u0431\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c <strong>dp<\/strong> \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u043c \u0448\u0430\u0433\u0435 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b <strong>X<sup>P<\/sup>\u00a0=\u00a0X<sup>c<\/sup>\u00d7X<sup>dp<\/sup><\/strong>.<\/p>\n<p>\u0426\u0435\u043b\u0430\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u044c <strong>X<sup>c<\/sup><\/strong> \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0441\u0442\u043e\u043c \u0446\u0438\u043a\u043b\u0435 <strong>for\u00a0(int\u00a0n\u00a0=\u00a01;\u00a0n\u00a0&lt;=\u00a0c;\u00a0n++)<\/strong>, \u0438 \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0442\u044c \u0437\u0434\u0435\u0441\u044c \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043d\u0435\u0447\u0435\u0433\u043e. \u0412\u0441\u0451 \u00ab\u0432\u043e\u043b\u0448\u0435\u0431\u0441\u0442\u0432\u043e\u00bb \u0442\u0435\u0445 \u0441\u0430\u043c\u044b\u0445 \u00ab\u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0447\u0438\u0441\u0435\u043b\u00bb \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u0440\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0438 \u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 <strong>X<sup>dp<\/sup><\/strong>.<\/p>\n<p>\u0418 \u0437\u0434\u0435\u0441\u044c \u043c\u044b \u0441\u0440\u0430\u0437\u0443 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0432\u0441\u0451 \u0442\u043e \u043a\u043e\u043b\u0434\u0443\u043d\u0441\u0442\u0432\u043e, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044f \u0432\u0437\u044f\u043b \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0439. \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u044f \u0432\u0437\u044f\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u0442\u0442\u0443\u0434\u0430, \u0430 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443 <strong>MN\u00a0=\u00a00x3f7a3bea<\/strong>, \u0431\u0430\u0437\u0438\u0440\u0443\u044e\u0449\u0443\u044e\u0441\u044f \u043d\u0430 <strong>\u03c3\u00a0=\u00a00,0450465<\/strong> \u044f \u0437\u0430\u043c\u0435\u043d\u0438\u043b \u043d\u0430 <strong>MN\u00a0=\u00a00x3f7a3\u044159<\/strong>, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043d\u0430 <strong>\u03c3\u00a0=\u00a00,0450333<\/strong>. \u0413\u0434\u0435-\u0442\u043e \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0440\u0430\u0445 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 \u044f \u043f\u0440\u043e\u0447\u0451\u043b, \u0447\u0442\u043e \u0442\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u043b\u0443\u0447\u0448\u0435, \u0442\u0430\u043a \u0447\u0442\u043e \u043e\u0441\u0442\u0430\u0432\u043b\u044e \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u043d\u0430\u0440\u043e\u0434\u0443 \u0434\u043b\u044f \u0432\u0435\u0441\u0451\u043b\u044b\u0445 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0445\u043e\u043b\u0438\u0432\u0430\u0440\u043e\u0432.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u043f\u0435\u0440\u0432\u043e\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f <strong>X<sup>dp<\/sup><\/strong> \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"cs\">    FIBUnion y = new FIBUnion();     y.fVal = x;     y.iVal = (int)(MN + dp * (y.iVal - MN));     float ty = y.fVal;<\/code><\/pre>\n<p>\u0433\u0434\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 <strong>FIBUnion<\/strong> \u0437\u0430\u0434\u0430\u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"cs\">    public struct FIBUnion     {         [FieldOffset(0)]         public float fVal;          [FieldOffset(0)]         public int iVal;          [FieldOffset(0)]         public bool bVal;     }<\/code><\/pre>\n<p>\u041e\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u043e\u0434\u043d\u043e\u0439 \u0438 \u0442\u043e\u0439 \u0436\u0435 \u044f\u0447\u0435\u0439\u043a\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 32 \u0431\u0438\u0442\u0430 \u043a\u0430\u043a \u043a \u0440\u0430\u0437\u043d\u044b\u043c \u0442\u0438\u043f\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u2013 float, int \u0438\u043b\u0438 bool.<\/p>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435, \u0432 <strong>ty<\/strong> \u0438\u043c\u0435\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u044f <strong>X<sup>dp<\/sup><\/strong>.<\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u044d\u0442\u0430\u043f\u043e\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430, \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u043c\u0435\u0442\u043e\u0434 \u041d\u044c\u044e\u0442\u043e\u043d\u0430, \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0430\u0432\u0442\u043e\u0440\u0430\u043c \u043f\u0440\u043e\u0447\u0438\u0445 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0445 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432.<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0444\u043e\u0440\u043c\u0443\u043b\u0443 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u044f.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u0438\u0441\u0445\u043e\u0434\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e <strong>Y\u00a0=\u00a0X<sup>P<\/sup><\/strong> \u043f\u0435\u0440\u0435\u043f\u0438\u0448\u0435\u043c \u0432 \u0432\u0438\u0434\u0435 <strong>Y<sup>1\/P<\/sup>\u00a0\u2013\u00a0X\u00a0=\u00a00<\/strong>. \u041a\u0441\u0442\u0430\u0442\u0438, \u0443\u0436\u0435 \u043e\u0442\u0441\u044e\u0434\u0430 \u0441\u043b\u0435\u0434\u0443\u0435\u0442, \u0447\u0442\u043e \u0441\u043b\u0443\u0447\u0430\u0439 \u0441 <strong>P\u00a0=\u00a00<\/strong> \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0434\u043e \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0443\u0447\u0430\u0441\u0442\u043a\u0430 \u043a\u043e\u0434\u0430. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, <strong>f(Y)\u00a0=\u00a0Y<sup>1\/P<\/sup>\u00a0\u2013\u00a0X<\/strong>, \u0438 <strong>f\u2019(Y)\u00a0=\u00a0(1\/P)\u00d7Y<sup>(1\/P-1)<\/sup><\/strong>.<\/p>\n<p>\u0418\u0442\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0444\u043e\u0440\u043c\u0443\u043b\u0430 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a <strong>Y<sub>n+1<\/sub>\u00a0=\u00a0Y<sub>n<\/sub>\u00a0\u2013\u00a0f(Y<sub>n<\/sub>)\/f\u2019(Y<sub>n<\/sub>)<\/strong>.<\/p>\n<p>\u041f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0432 \u043d\u0430\u0448\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f <strong>f(Y)<\/strong> \u0438 <strong>f\u2019(Y)<\/strong>, \u0438 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0432 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0444\u043e\u0440\u043c\u0443\u043b\u044b \u0434\u043b\u044f \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430:<\/p>\n<p>\u00a0<strong>Res\u00a0=\u00a0Y\u00d7(1+P\u00d7(X\/Y<sup>(1\/P)<\/sup>-1))<\/strong>.<\/p>\n<p>\u00a0\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u044b \u0431\u0443\u0434\u0443\u0442 <strong>Y\u00a0=\u00a0ty<\/strong>, \u0438 <strong>P\u00a0=\u00a0dp<\/strong>, \u0438 \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0442 \u0432\u0438\u0434:<\/p>\n<p>\u00a0<strong>Res\u00a0=\u00a0ty\u00d7(1+dp\u00d7(X\/ty<sup>(1\/dp)<\/sup>-1))<\/strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 (1)<\/p>\n<p>\u00a0\u0418 \u0437\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u0437\u0430\u0431\u0430\u0432\u043d\u044b\u0439 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <strong>Y\u00a0=\u00a0X<sup>P<\/sup><\/strong> \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c <strong>g(Y)\u00a0=\u00a0ty<sup>(1\/dp)<\/sup><\/strong>.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c <strong>q\u00a0=\u00a01\/dp<\/strong>, \u0442\u043e <strong>g(Y)\u00a0=\u00a0ty<sup>q<\/sup><\/strong>, \u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442 \u0432 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u044e.<\/p>\n<p>\u0418 \u043d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u0446\u0435\u043b\u044c \u0432\u0441\u0435\u0433\u043e \u043c\u0435\u0440\u043e\u043f\u0440\u0438\u044f\u0442\u0438\u044f \u2013 <strong>\u0431\u044b\u0441\u0442\u0440\u043e\u0435<\/strong> \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 <strong>\u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0451\u043d\u043d\u043e\u0433\u043e<\/strong> \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0447\u0438\u0441\u043b\u0430, \u0430 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0432\u043c\u0435\u0441\u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u043b\u043e\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0439 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <strong>ty<sup>q<\/sup><\/strong> \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0442\u043e\u043c\u0443, \u043a\u0430\u043a \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 <strong>X<sup>P<\/sup><\/strong>.<\/p>\n<p>\u0420\u0430\u0437\u043b\u043e\u0436\u0438\u043c <strong>q<\/strong> \u043d\u0430 \u0446\u0435\u043b\u0443\u044e <strong>c<\/strong> \u0438 \u0434\u0440\u043e\u0431\u043d\u0443\u044e <strong>inv<\/strong> \u0447\u0430\u0441\u0442\u044c. \u0426\u0435\u043b\u0443\u044e \u0441\u0442\u0435\u043f\u0435\u043d\u044c <strong>ty<sup>c<\/sup><\/strong> \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u043c, \u043a\u0430\u043a \u0438 \u0440\u0430\u043d\u0435\u0435, \u0432 \u0446\u0438\u043a\u043b\u0435, \u0430 \u043f\u0435\u0440\u0432\u043e\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u0435 \u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 <strong>ty<sup>inv<\/sup><\/strong> \u0441\u043d\u043e\u0432\u0430 \u043f\u043e\u043b\u044c\u0437\u0443\u044f\u0441\u044c \u00ab\u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0447\u0438\u0441\u043b\u043e\u043c\u00bb:<\/p>\n<pre><code class=\"cs\">    y.iVal = (int)(MN + inv * (y.iVal - MN));     inv = y.fVal;<\/code><\/pre>\n<p>\u0412 <strong>inv<\/strong> \u0438\u043c\u0435\u0435\u043c \u043f\u0435\u0440\u0432\u043e\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u0440\u043e\u0431\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0435\u043f\u0435\u043d\u0438 <strong>1\/dp<\/strong>, \u043d\u0430 \u0447\u0451\u043c \u044f \u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0441\u044f, \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0432, \u0447\u0442\u043e \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0435 \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u044f \u0441\u0438\u043b\u044c\u043d\u043e \u0437\u0430\u043c\u0435\u0434\u043b\u044f\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0432\u044b\u0433\u043e\u0434\u044b \u043d\u0435 \u0434\u0430\u0434\u0443\u0442. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u044f \u043e\u0441\u0442\u0430\u0432\u0438\u043b \u043d\u0430 \u0431\u0443\u0434\u0443\u0449\u0438\u0435 \u0442\u0435\u0441\u0442\u044b \u0433\u043e\u0442\u043e\u0432\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0442 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0434\u0430\u043b\u0435\u0435.<\/p>\n<p>\u041e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0432\u043e\u0435\u0434\u0438\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <strong>ty<sup>(1\/dp)<\/sup><\/strong>, \u0434\u0430\u043b\u0435\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435 <strong>(1)<\/strong> \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <strong>X<sup>dp<\/sup><\/strong>, \u0438 \u0434\u0430\u043b\u0435 \u0438\u0441\u043a\u043e\u043c\u043e\u0435 <strong>X<sup>P<\/sup><\/strong>.<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044f \u044d\u0442\u043e\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c. \u0412\u044b\u0448\u0435\u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0435 \u0446\u0438\u043a\u043b\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0446\u0435\u043b\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0435\u0439 <strong>X<sup>P<\/sup><\/strong> \u0438 <strong>ty<sup>q<\/sup><\/strong> \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f <strong>P\u00a0>\u00a00<\/strong>, \u0442\u0430\u043a \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435. \u0414\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0442\u0435\u0445 \u0436\u0435 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u043f\u0440\u0438 <strong>P\u00a0&lt;\u00a00<\/strong> \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043b\u0438\u0431\u043e \u043f\u0435\u0440\u0435\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0445 \u0432\u0435\u043b\u0438\u0447\u0438\u043d, \u043b\u0438\u0431\u043e \u0434\u0435\u043b\u0435\u043d\u0438\u044f. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u044d\u0442\u043e \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0435\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u044f \u0435\u0433\u043e \u0443\u0436\u0435 \u043d\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043d\u0430 \u0434\u0432\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0443\u0447\u0430\u0441\u0442\u043a\u0430. \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0432 \u0446\u0438\u043a\u043b\u0435 \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u043e \u0437\u0430\u043c\u0435\u0434\u043b\u0438\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0434\u043b\u044f \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0441 <strong>P\u00a0&lt;\u00a00<\/strong>.<\/p>\n<p>\u042f \u043f\u0440\u0438\u043d\u044f\u043b \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0438\u0441\u043a\u0430\u0442\u044c <strong>X<sup>c<\/sup><\/strong> \u0438 <strong>X<sup>dp<\/sup><\/strong> \u0441 <strong>c<\/strong>\u00a0 \u0438 <strong>dp<\/strong> , \u0432\u0437\u044f\u0442\u044b\u043c\u0438 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e, \u0430 \u0437\u0430\u0442\u0435\u043c, \u043f\u0440\u0438 <strong>P\u00a0&lt;\u00a00<\/strong>, \u0432\u0437\u044f\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430.<\/p>\n<p>\u042d\u0442\u043e, \u043d\u0435 \u043e\u0442\u043c\u0435\u043d\u0438\u043b\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0440\u0430\u0437\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u043e \u0434\u0432\u0443\u043c \u0432\u0435\u0442\u0432\u044f\u043c \u0434\u043b\u044f <strong>P\u00a0&lt;\u00a00<\/strong> \u0438 <strong>P\u00a0>\u00a00<\/strong>, \u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0432\u0438\u043d\u0443\u043b\u043e \u0435\u0433\u043e \u0431\u043b\u0438\u0436\u0435 \u043a \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430. \u042d\u0442\u0438 \u0434\u0432\u0435 \u0432\u0435\u0442\u0432\u0438 \u0438\u043c\u0435\u044e\u0442 \u043f\u0440\u043e\u0442\u044f\u0436\u0451\u043d\u043d\u044b\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0435\u0441\u044f \u0443\u0447\u0430\u0441\u0442\u043a\u0438 \u043a\u043e\u0434\u0430, \u043e\u0434\u043d\u0430\u043a\u043e, \u0432\u044b\u0434\u0435\u043b\u044f\u0442\u044c \u0438\u0445 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0438\u043b\u0438 \u043e\u0431\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u043c\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430\u043c\u0438 \u044f \u043d\u0435 \u0441\u0442\u0430\u043b, \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430 \u00ab\u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u00a0>\u00a0\u0440\u0430\u0437\u043c\u0435\u0440\u00bb.<\/p>\n<p>\u0412 \u0445\u043e\u0434\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430 \u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0434\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u044f \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u044e <a href=\"https:\/\/habr.com\/ru\/companies\/otus\/articles\/779396\/\" rel=\"noopener noreferrer nofollow\">\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0432\u043e\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0432 \u0441\u0442\u0435\u043f\u0435\u043d\u044c<\/a>. \u0418\u0437 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u044f \u0432\u044b\u0431\u0440\u0430\u043b \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0446\u0435\u043b\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438, \u0437\u0430\u043c\u0435\u043d\u0438\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0446\u0438\u043a\u043b\u044b \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f. \u0422\u0430\u043a \u043a\u0430\u043a \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u0447\u0438\u0441\u0435\u043b \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u0435\u0441\u044c\u043c\u0430 \u0437\u0430\u0442\u0440\u0430\u0442\u043d\u044b\u043c\u0438 \u043f\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043d\u043e\u043c\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u044f \u0441\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0439 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0434\u043b\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u0435\u0439 0 \u2013 5 \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0430, \u043d\u043e \u0441 \u0440\u043e\u0441\u0442\u043e\u043c \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0440\u0435\u0437\u043a\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u0435\u0442. \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u043b \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0434\u0432\u0443\u043a\u0440\u0430\u0442\u043d\u043e\u0435 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u0438 15 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0446\u0438\u043a\u043b\u0430 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0439.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430 \u0432 \u0446\u0435\u043b\u044f\u0445 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0435\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u0432\u0435\u0442 \u0443\u0432\u0438\u0434\u0435\u043b\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f <strong>Power(float\u00a0x,\u00a0float\u00a0p)<\/strong>:<\/p>\n<pre><code class=\"cs\">    \/\/ \u0431\u044b\u0441\u0442\u0440\u043e\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 p \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0445 c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430\u043c\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432     public static float Power(float x, float p)     {         const float eLim = 0.01f;       \/\/ \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0430\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0441 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u043e\u0439         const int MN = 0x3f7a3c59;          \/\/ \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439         if (p == 0) return 1;           \/\/ \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u0435 \u0434\u043b\u044f p = 0         if (p == 1) return x;           \/\/ \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u0435 \u0434\u043b\u044f p = 1         \/\/if (x &lt; 0) return float.NaN;  \/\/ \u0434\u043b\u044f \u0446\u0435\u043b\u044b\u0445 p \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u043d\u0435 \u0432\u0435\u0440\u043d\u043e, \u0441\u043c. \u0434\u0430\u043b\u0435\u0435         if (x == 0)                     \/\/ \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u043b\u044f x = 0         {             if (p &lt; 0) return float.PositiveInfinity;             else return 0;         }          float dp;         \/\/ c + dp = |p|, \u0433\u0434\u0435 c - \u0446\u0435\u043b\u043e\u0435, \u0430 dp - \u0434\u0440\u043e\u0431\u043d\u044b\u0439 \u043e\u0441\u0442\u0430\u0442\u043e\u043a         int c = (int)p;         if (p &lt; 0)         {             dp = c - p; \/\/ dp >= 0             c = ~(--c); \/\/ |c| >= 0         }         else dp = p - c; \/\/ dp, c >= 0          \/\/if (dp != 0 &amp;&amp; x &lt; 0) return float.NaN; \/\/ \u0434\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 if, \u0441\u043c. \u0434\u0430\u043b\u0435\u0435          \/\/ yn^|p| = yn^dp*yn^c         \/\/ \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u043c fRes = yn^c         \/\/ \u0447\u0435\u0440\u0435\u0437 \u0446\u0438\u043a\u043b\u044b \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0439         \/*float fRes = 1;         for (int n = 1; n &lt;= c; n++)         {             fRes *= x;         }*\/         \/\/ \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u043d\u043e\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435         float fRes;         float inv = x;         if ((c &amp; 1) == 0) \/\/ \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0447\u0451\u0442\u043d\u043e\u0441\u0442\u0438         {             fRes = 1;         }         else         {             fRes = inv;         }         c = c >> 1;         while (c != 0)         {             inv *= inv;             if ((c &amp; 1) == 1)             {                 fRes *= inv;             }             c = c >> 1;         }         \/\/ \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0446\u0435\u043b\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0435\u043f\u0435\u043d\u0438          if (p &lt; 0)         {             \/\/if (dp == 0) return 1 \/ fRes;   \/\/ \u0434\u0430\u043b\u044c\u0448\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u043d\u0435\u0447\u0435\u0433\u043e             if (dp &lt; eLim) return 1 \/ fRes; \/\/ \u0434\u043b\u044f \u0441\u043d\u0438\u0436\u0435\u043d\u0438\u044f \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f             if (x &lt; 0) return float.NaN;    \/\/ \u0434\u043b\u044f \u043d\u0435\u0446\u0435\u043b\u044b\u0445 p \u043f\u0440\u0438 x &lt; 0              \/\/ \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u043c yn^dp, \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u043c. FastPower             float inv = 1 \/ dp;             c = (int)inv;             inv = inv - c;              FIBUnion y = new FIBUnion();             y.fVal = x;             y.iVal = (int)(MN + dp * (y.iVal - MN));             float ty = y.fVal;              y.iVal = (int)(MN + inv * (y.iVal - MN));             inv = y.fVal;              \/*for (int n = 1; n &lt;= c; n++)             {                 inv *= ty;             }*\/             float v = ty;             if ((c &amp; 1) == 1)             {                 inv *= v;             }             c = c >> 1;             while (c != 0)             {                 v *= v;                 if ((c &amp; 1) == 1)                 {                     inv *= v;                 }                 c = c >> 1;             }              inv = x \/ inv;             return 1 \/ (fRes * ty * (1 + (dp * (--inv))));         }         else         {             \/\/ \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0434\u043b\u044f p>0             \/\/if (dp == 0) return fRes;             if (dp &lt; eLim) return fRes;             if (x &lt; 0) return float.NaN;              float inv = 1 \/ dp;             c = (int)inv;             inv = inv - c;              FIBUnion y = new FIBUnion();             y.fVal = x;             y.iVal = (int)(MN + dp * (y.iVal - MN));             float ty = y.fVal;              y.iVal = (int)(MN + inv * (y.iVal - MN));             inv = y.fVal;              \/*for (int n = 1; n &lt;= c; n++)             {                 inv *= ty;             }*\/             float v = ty;             if ((c &amp; 1) == 1)             {                 inv *= v;             }             c = c >> 1;             while (c != 0)             {                 v *= v;                 if ((c &amp; 1) == 1)                 {                     inv *= v;                 }                 c = c >> 1;             }              \/\/ \u0424\u043e\u0440\u043c\u0443\u043b\u0430 \u043c\u0435\u0442\u043e\u0434\u0430 \u041d\u044c\u044e\u0442\u043e\u043d\u0430 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u044f p>0             inv = x \/ inv;             return fRes * ty * (1 + (dp * (--inv)));         }     }<\/code><\/pre>\n<p>\u0418 \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 <strong>FIBUnion<\/strong>:<\/p>\n<pre><code class=\"cs\">    public struct FIBUnion     {         [FieldOffset(0)]         public float fVal;          [FieldOffset(0)]         public int iVal;          [FieldOffset(0)]         public bool bVal;     }<\/code><\/pre>\n<h2>\u041b\u0443\u0447\u0448\u0435\u0435 \u0432\u0440\u0430\u0433 \u0445\u043e\u0440\u043e\u0448\u0435\u0433\u043e?<\/h2>\n<p>\u0415\u0449\u0451 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0438\u0434\u0435\u044f \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u0443\u0447\u0430\u0441\u0442\u043e\u043a \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <strong>ty<sup>inv<\/sup><\/strong> \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043f\u043e\u0434\u043e\u0431\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u0440\u043d\u044f. \u041d\u0438\u043a\u0430\u043a\u0438\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u00ab\u043f\u043b\u043e\u0445\u0438\u0435\u00bb \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0451\u0442\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0437\u0430 \u0433\u0440\u0430\u043d\u0438\u0446\u0435\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u0437\u0430\u0442\u043e \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0432\u044b\u0448\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f. \u041f\u043e \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u044d\u0442\u0430 \u0438\u0434\u0435\u044f \u0431\u044b\u043b\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043a \u044d\u0442\u0430\u043f\u0443 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u044b\u0448\u043b\u0438 \u0434\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u2013 \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f <strong>Power(float\u00a0x,\u00a0float\u00a0p)<\/strong> \u0438 \u0435\u0451 \u0443\u043f\u0440\u043e\u0449\u0451\u043d\u043d\u044b\u0439 \u0438 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 <strong>FastPower(float\u00a0x,\u00a0float\u00a0p)<\/strong>:<\/p>\n<pre><code class=\"cs\">    \/\/ \u0431\u044b\u0441\u0442\u0440\u043e\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 a \u042d (0, 1) \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0445 > 0 \u0431\u0435\u0437 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a     public static float FastPower(float x, float a)     {         \/* \"\u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435\" \u0447\u0438\u0441\u043b\u043e MN = L(B-s)          \u0434\u043b\u044f \u0442\u0438\u043f\u0430 \"float\" \u0445 = [(-1)^sign]*[2^(E-B)]*M,          \u0433\u0434\u0435 int \u0415 - 8 \u0431\u0438\u0442 \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0442\u044b, B = 127, int M - 23 \u0431\u0438\u0442\u0430 \u043c\u0430\u043d\u0442\u0438\u0441\u0441\u044b, L = 2^23              \u0435\u0441\u043b\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043a \u0445 = (1+m)2^e, \u0433\u0434\u0435 e = E-B, \u0430 m = M\/L              \u0430 \u0435\u0433\u043e \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u0430\u044f \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u044f i = M+LE              \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0447\u0438\u0441\u043b\u043e s = 0.0450465              \u0437\u0430\u043c\u0435\u043d\u0435\u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u0430\u0447\u043d\u044b\u043c s = 0.0450333 *\/         const int MN = 0x3f7a3c59; \/\/ \u0434\u043e \u0437\u0430\u043c\u0435\u043d\u044b s \u0431\u044b\u043b\u043e MN = 0x3f7a3bea          \/* \u043c\u0435\u0442\u043e\u0434 \u041d\u044c\u044e\u0442\u043e\u043d\u0430. yn+1 = yn - f(yn)\/f'(yn)         y = x^a; f(y) = y^(1\/a)-x; f'(y) = (1\/a)*1\/(y^(1\/a-1))         yn+1 = yn*(1+a*(x\/yn^(1\/a)-1)) *\/          \/\/ \u043d\u0430\u0439\u0434\u0451\u043c yn^(1\/a)          float inv = 1 \/ a;         int c = (int)inv;         inv = inv - c;         \/\/ \u0442\u0435\u043f\u0435\u0440\u044c c + inv = 1\/a, \u0433\u0434\u0435 c - \u0446\u0435\u043b\u043e\u0435, \u0430 inv - \u0434\u0440\u043e\u0431\u043d\u044b\u0439 \u043e\u0441\u0442\u0430\u0442\u043e\u043a          \/\/ \u043f\u0435\u0440\u0432\u043e\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u0435 \u0432 ty         FIBUnion y = new FIBUnion();         y.fVal = x;         y.iVal = (int)(MN + a * (y.iVal - MN));         float ty = y.fVal;          \/\/ yn^(1\/a) = yn^inv*yn^c         \/\/ \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e yn^inv         y.iVal = (int)(MN + inv * (y.iVal - MN));         inv = y.fVal;          \/\/ \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c yn^c \u0438 \u0441\u043e\u0431\u0435\u0440\u0451\u043c yn^(|1\/a|) => inv         \/\/ \u0447\u0435\u0440\u0435\u0437 \u0446\u0438\u043a\u043b\u044b \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0439         \/*float fRes = 1;         for (int n = 1; n &lt;= c; n++)         {             fRes *= x;         }*\/         \/\/ \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u043d\u043e\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435         float fRes;         float inv = x;         if ((c &amp; 1) == 0) \/\/ \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0447\u0451\u0442\u043d\u043e\u0441\u0442\u0438         {             fRes = 1;         }         else         {             fRes = inv;         }         c = c >> 1;         while (c != 0)         {             inv *= inv;             if ((c &amp; 1) == 1)             {                 fRes *= inv;             }             c = c >> 1;         }         \/\/ \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0446\u0435\u043b\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0435\u043f\u0435\u043d\u0438          \/\/yn+1 = yn*(1+a*(x\/yn^(1\/a)-1))         inv = x \/ inv;         return ty * (1 + (a * (--inv)));     }<\/code><\/pre>\n<h2>\u042d\u0442\u043e \u043a\u0442\u043e \u0442\u0443\u0442 \u0442\u0430\u043a\u043e\u0439 \u043b\u043e\u0445\u043c\u0430\u0442\u0435\u043d\u044c\u043a\u0438\u0439?   <\/h2>\n<p>\u041d\u0430\u0447\u043d\u0451\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u00ab\u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u043e\u0434 -> \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u043a\u043e\u0434 -> \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0439 \u043a\u043e\u0434\u00bb. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043f\u0435\u0440\u0432\u044b\u043c \u044d\u0442\u0430\u043f\u043e\u043c \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u044f \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b \u0435\u0449\u0451 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u043e\u0434\u043d\u0430\u043a\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0442 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0451\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c\u044b\u0445 \u0438\u043c\u0438 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0439.<\/p>\n<p>\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0446\u0435\u043b\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0439 \u0434\u043b\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u0447\u0438\u0441\u0435\u043b \u0442\u0438\u043f\u0430 <strong>float<\/strong>. \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0432\u043a\u043b\u0430\u0434 \u0432 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0449\u0435\u0435 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u043e\u0431\u0443\u0441\u043b\u043e\u0432\u043b\u0435\u043d \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0435\u043f\u0435\u043d\u0438. \u042d\u0442\u0430 \u0447\u0430\u0441\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u0430 \u0434\u043b\u044f \u043e\u0431\u0435\u0438\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u041f\u043e \u044d\u0442\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u043e\u0446\u0435\u043d\u043a\u0443 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0439 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u044f \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>FastPower<\/strong>.<\/p>\n<p>\u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0438\u0437 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430 <strong>(0;\u00a0+1)<\/strong> \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u043b\u0438\u0441\u044c \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432:<\/p>\n<pre><code class=\"cs\">    float[] fX = new float[iIt];     float[] fY = new float[iIt];     Random Rnd = new Random(iRnd);      \/\/ \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432     for (int i = 0; i &lt; iIt; i++)     {         fX[i] = ((float)Rnd.NextDouble())*flEnd+flBeg;     }<\/code><\/pre>\n<p>\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u043b\u0438\u0441\u044c \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u044f \u043f\u043e\u043b\u0443\u0447\u0430\u043b \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 <strong>Math<\/strong>.<strong>Pow<\/strong>.<\/p>\n<p>\u0414\u043b\u044f 4\u00a0000 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 <strong>\u0425<\/strong> \u0432 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0435 <strong>(+0,0001;\u00a0+1)<\/strong>, \u043f\u043e 1\u00a0000 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430, \u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0439 <strong>Y<sub>p<\/sub>\u00a0=\u00a0FastPower(\u0425,\u00a00.75)<\/strong> \u0438 <strong>Y\u00a0=\u00a0Math<\/strong>.<strong>Pow(\u0425,\u00a00.75)<\/strong>, \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043b \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u044b \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f <strong>100*|Y<sub>p<\/sub>\u00a0\u2013\u00a0Y|\/Y<\/strong>, \u0432 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u0430\u0445, \u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043b \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0443 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>FastPower<\/strong> \u043e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 (\u0440\u0438\u0441. 1):<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/375\/b5a\/3a1\/375b5a3a1a7db26bfa322541584b88cc.jpg\" alt=\"\u0420\u0438\u0441. 1. \u041e\u0441\u044c \u0430\u0431\u0441\u0446\u0438\u0441\u0441 \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0438\u0447\u0435\u0441\u043a\u0430\u044f.\" title=\"\u0420\u0438\u0441. 1. \u041e\u0441\u044c \u0430\u0431\u0441\u0446\u0438\u0441\u0441 \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0438\u0447\u0435\u0441\u043a\u0430\u044f.\" width=\"1335\" height=\"583\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/375\/b5a\/3a1\/375b5a3a1a7db26bfa322541584b88cc.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441. 1. \u041e\u0441\u044c \u0430\u0431\u0441\u0446\u0438\u0441\u0441 \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0438\u0447\u0435\u0441\u043a\u0430\u044f.<\/figcaption><\/div>\n<\/figure>\n<p>\u00a0\u0418\u0437 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u0430 \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u043d\u043e\u0441\u0442\u044c \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f, \u043f\u043e \u044d\u0442\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435, \u044f \u0440\u0430\u0437\u0431\u0438\u043b \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0443 \u043d\u0430 \u0442\u0440\u0438 \u0443\u0447\u0430\u0441\u0442\u043a\u0430 \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u043f\u043e\u0440\u044f\u0434\u043a\u0443 \u0432 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0435 <strong>(+0,0001;\u00a0+1)<\/strong> \u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u043b \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435, \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u043e\u0435 \u0434\u043b\u044f \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u0443\u0447\u0430\u0441\u0442\u043a\u043e\u0432. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043d\u0430 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0435 (\u0440\u0438\u0441. 2):<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/153\/79f\/454\/15379f4542885348683d47409063527b.jpg\" alt=\"\u0420\u0438\u0441. 2.\" title=\"\u0420\u0438\u0441. 2.\" width=\"941\" height=\"588\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/153\/79f\/454\/15379f4542885348683d47409063527b.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441. 2.<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0430 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0435 \u043b\u0435\u0433\u043a\u043e \u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>FastPower<\/strong> \u043e\u0442 <strong>X<\/strong> \u043f\u0440\u0438 <strong>P\u00a0=\u00a00,75<\/strong> \u043b\u043e\u0433\u043e\u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0430\u044f, \u0441 \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u043e\u043c 16.<\/p>\n<p>\u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043b \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0443 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>FastPower<\/strong> \u043e\u0442 <strong>X<\/strong> \u043f\u0440\u0438 <strong>P\u00a0=\u00a00,55<\/strong> (\u0440\u0438\u0441. 3):<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/384\/c2a\/0e9\/384c2a0e9b2944c9e69d2343b7941609.jpg\" alt=\"\u0420\u0438\u0441. 3.\" title=\"\u0420\u0438\u0441. 3.\" width=\"940\" height=\"573\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/384\/c2a\/0e9\/384c2a0e9b2944c9e69d2343b7941609.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441. 3.<\/figcaption><\/div>\n<\/figure>\n<p>\u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0434\u043b\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u0438 <strong>0,55<\/strong> \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u043d\u043e\u0441\u0442\u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u0442\u0441\u044f. \u0425\u0430\u0440\u0430\u043a\u0442\u0435\u0440 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 <strong>0,75<\/strong>.<\/p>\n<p>\u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c, \u0441\u043e\u0431\u0440\u0430\u0432 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u0435\u0439 \u043e\u0442 <strong>0,05<\/strong> \u0434\u043e <strong>0,95<\/strong> \u0441 \u0448\u0430\u0433\u043e\u043c <strong>0,1<\/strong>, \u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043b \u043e\u0431\u0449\u0443\u044e \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0443, \u0441 \u0446\u0435\u043b\u044c\u044e \u043f\u043e\u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0443 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u043e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u0438 <strong>P<\/strong> (\u0440\u0438\u0441. 4):<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/920\/e70\/af9\/920e70af92dba4c3c4bce7e72ce1e31a.jpg\" alt=\"\u0420\u0438\u0441. 4.\" title=\"\u0420\u0438\u0441. 4.\" width=\"943\" height=\"587\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/920\/e70\/af9\/920e70af92dba4c3c4bce7e72ce1e31a.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441. 4.<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u044b, \u0445\u043e\u0442\u044f \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0432 \u0441\u0435\u0431\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043e\u0441\u043e\u0431\u044b\u0445 \u0442\u043e\u0447\u0435\u043a, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u0438\u0437\u043b\u043e\u043c\u044b. \u041e\u0434\u043d\u0430\u043a\u043e, \u0434\u0430\u0436\u0435 \u0434\u043b\u044f \u00ab\u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0445\u00bb \u0432\u0437\u044f\u0442\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 <strong>P<\/strong> \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u0440\u0435\u0437\u043a\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430. \u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u043e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u043d\u043e\u0441\u0438\u0442 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440, \u0441\u0445\u043e\u0436\u0438\u0439 \u0441 \u0435\u0451 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u043e\u0442 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430.<\/p>\n<p>\u0421 \u0446\u0435\u043b\u044c\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0434\u043b\u044f 4\u00a0000 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 <strong>P<\/strong> \u0432 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0435 <strong>(0;\u00a0+1)<\/strong>, \u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0439 <strong>FastPower<\/strong>, \u043f\u0440\u0438 <strong>\u0425\u00a0=\u00a00,05<\/strong>, <strong>\u0425\u00a0=\u00a00,30<\/strong>, <strong>\u0425\u00a0=\u00a00,55<\/strong> \u0438 <strong>\u0425\u00a0=\u00a00,95<\/strong>, \u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043b \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0443 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>FastPower<\/strong> \u043e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 (\u0440\u0438\u0441. 5):<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/5cb\/69c\/1de\/5cb69c1de206c88161a6ab6aab23f2eb.jpg\" alt=\"\u0420\u0438\u0441. 5.\" title=\"\u0420\u0438\u0441. 5.\" width=\"940\" height=\"582\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5cb\/69c\/1de\/5cb69c1de206c88161a6ab6aab23f2eb.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u0420\u0438\u0441. 5.<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u043b\u0438 \u0438 \u0441\u0434\u0435\u043b\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>FastPower<\/strong> \u043e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043b\u0438 \u00ab\u0441\u043b\u0430\u0431\u043e\u0435 \u043c\u0435\u0441\u0442\u043e\u00bb \u0432 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0418\u0437 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c \u0440\u0438\u0441. 1 \u2013 5 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043d\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 3%. \u041e\u0434\u043d\u0430\u043a\u043e, \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043c\u0430\u043b\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 <strong>\u0420<\/strong>, \u043e\u043d\u0430 \u0440\u0435\u0437\u043a\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u0435\u0442, \u0438, \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0441\u0442\u0440\u0435\u043c\u0438\u0442\u0441\u044f \u043a +<strong>\u221e<\/strong> (\u0440\u0438\u0441. 5). \u0421\u043b\u043e\u0436\u0438\u0432\u0448\u0443\u044e\u0441\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0431\u0435\u0437 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0439 \u043d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>FastPower<\/strong>, \u043d\u043e \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>Power<\/strong> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0437\u0430\u0449\u0438\u0442\u043d\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u044f \u043e\u0431\u044a\u044f\u0432\u0438\u043b \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443 <strong>eLim\u00a0=\u00a00.01f<\/strong>, \u0438 \u043f\u0435\u0440\u0435\u0434 \u043d\u0430\u0447\u0430\u043b\u043e\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f <strong>X<sup>dp<\/sup><\/strong> \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 <strong>dp\u00a0=\u00a00<\/strong> \u0437\u0430\u043c\u0435\u043d\u0438\u043b \u043d\u0430 <strong>dp\u00a0&lt;\u00a0eLim<\/strong>. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043c\u0430\u043b\u044b\u0445 <strong>dp<\/strong> \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043a\u0430\u043a \u0434\u043b\u044f <strong>dp\u00a0=\u00a00<\/strong>, \u0438 \u043d\u0435 \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0440\u043e\u0441\u0442\u0430 \u043e\u0448\u0438\u0431\u043a\u0438 \u0434\u043e \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u0438.<\/p>\n<h2>\u0412\u0435\u0441\u0451\u043b\u044b\u0435 \u0441\u0442\u0430\u0440\u0442\u044b   <\/h2>\n<p>\u041d\u0430\u0441\u0442\u0430\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0443\u0437\u043d\u0430\u0442\u044c, \u0440\u0430\u0434\u0438 \u0447\u0435\u0433\u043e \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u043d\u0430 \u0432\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430. \u0414\u043b\u044f \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b <strong>Stopwatch<\/strong> \u0438\u0437 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d <strong>System<\/strong>.<strong>Diagnostics<\/strong>\u00a0C#. \u0414\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0444\u0443\u043d\u043a\u0446\u0438\u044e <strong>Math<\/strong>.<strong>Pow<\/strong>. \u041a\u0430\u0436\u0434\u044b\u0439 \u0442\u0435\u0441\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043b \u0438\u0437 \u0446\u0438\u043a\u043b\u043e\u0432, \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f \u043c\u0430\u0441\u0441\u0438\u0432 \u0438\u0437 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439, \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430. \u0418\u0437 \u0432\u0441\u0435\u0445 \u0446\u0438\u043a\u043b\u043e\u0432 \u0432\u044b\u0431\u0438\u0440\u0430\u043b\u0441\u044f \u0446\u0438\u043a\u043b \u0441 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f (\u0441\u0430\u043c\u044b\u0439 \u0431\u044b\u0441\u0442\u0440\u044b\u0439). \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0438 \u0442\u043e\u043c \u0436\u0435 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435, \u0432 \u0446\u0435\u043b\u044f\u0445 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0431\u043b\u0438\u0437\u043a\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439, \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u0441 \u043e\u0434\u043d\u0438\u043c \u0438 \u0442\u0435\u043c \u0436\u0435 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c. \u0418\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 <strong>Power<\/strong> \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u0432 \u0432\u0438\u0434\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430:<\/p>\n<pre><code>    Stopwatch sw = new Stopwatch();     Random Rnd = new Random(iRnd);     for (int cc = 0; cc&lt;iCyc; cc++)     {         sw.Reset();         \/\/ \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432         for (int i = 0; i &lt; iIt; i++)         {             fX[i] = ((float)Rnd.NextDouble())*flEnd+flBeg;         }          sw.Start();         for (int i = 0; i &lt; iIt; i++)         {             fY[i] = Func.Power(fX[i], flP);         }         sw.Stop();     }<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u0441 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435<strong> \u0425\u00a0>\u00a00<\/strong> \u044f \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>FastPower<\/strong>, \u0438 <strong>FastInvSqr<\/strong> \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u0440\u043d\u044f. \u0412\u0441\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u044b \u0441\u043e <strong>Stopwatch<\/strong> \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432\u044b\u0441\u043e\u043a\u043e\u0433\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f (IsHighResolution\u00a0==\u00a0True), \u0438 \u0432\u044b\u0440\u0430\u0436\u0430\u044e\u0442\u0441\u044f \u0432 \u0442\u0430\u043a\u0442\u0430\u0445 \u0442\u0430\u0439\u043c\u0435\u0440\u0430 (ElapsedTicks). \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f (\u0442\u0430\u0431.\u00a01):<\/p>\n<p>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 1. \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0446\u0438\u043a\u043b\u043e\u0432 300, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0432 \u0446\u0438\u043a\u043b\u0435 2000.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"55\" width=\"55\">\n<p align=\"left\">\u2116 \u043f\u043f<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d <strong>\u0425<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>P<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Math<\/strong>.<strong>Pow<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Power<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"106\" width=\"106\">\n<p align=\"left\"><strong>FastPower<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>FastInvSqr<\/strong>   <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"55\" width=\"55\">\n<p align=\"left\">1<\/p>\n<\/td>\n<td>\n<p align=\"left\">(-2;\u00a0+2)<\/p>\n<\/td>\n<td>\n<p align=\"left\">-2,75<\/p>\n<\/td>\n<td>\n<p align=\"left\">363<\/p>\n<\/td>\n<td>\n<p align=\"left\">295<\/p>\n<\/td>\n<td data-colwidth=\"106\" width=\"106\">\n<p align=\"left\">\u00a0<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u00a0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"55\" width=\"55\">\n<p align=\"left\">2<\/p>\n<\/td>\n<td>\n<p align=\"left\">(-10;\u00a0+10)<\/p>\n<\/td>\n<td>\n<p align=\"left\">-2,75<\/p>\n<\/td>\n<td>\n<p align=\"left\">356<\/p>\n<\/td>\n<td>\n<p align=\"left\">296<\/p>\n<\/td>\n<td data-colwidth=\"106\" width=\"106\">\n<p align=\"left\">\u00a0<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u00a0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"55\" width=\"55\">\n<p align=\"left\">3<\/p>\n<\/td>\n<td>\n<p align=\"left\">(-2;\u00a0+2)<\/p>\n<\/td>\n<td>\n<p align=\"left\">2,75<\/p>\n<\/td>\n<td>\n<p align=\"left\">363<\/p>\n<\/td>\n<td>\n<p align=\"left\">273<\/p>\n<\/td>\n<td data-colwidth=\"106\" width=\"106\">\n<p align=\"left\">\u00a0<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u00a0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"55\" width=\"55\">\n<p align=\"left\">4<\/p>\n<\/td>\n<td>\n<p align=\"left\">(-2;\u00a0+2)<\/p>\n<\/td>\n<td>\n<p align=\"left\">-15,13<\/p>\n<\/td>\n<td>\n<p align=\"left\">358<\/p>\n<\/td>\n<td>\n<p align=\"left\">493<\/p>\n<\/td>\n<td data-colwidth=\"106\" width=\"106\">\n<p align=\"left\">\u00a0<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u00a0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"55\" width=\"55\">\n<p align=\"left\">5<\/p>\n<\/td>\n<td>\n<p align=\"left\">(0;\u00a0+2)<\/p>\n<\/td>\n<td>\n<p align=\"left\">-15,13<\/p>\n<\/td>\n<td>\n<p align=\"left\">359<\/p>\n<\/td>\n<td>\n<p align=\"left\">613<\/p>\n<\/td>\n<td data-colwidth=\"106\" width=\"106\">\n<p align=\"left\">\u00a0<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u00a0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"55\" width=\"55\">\n<p align=\"left\">6<\/p>\n<\/td>\n<td>\n<p align=\"left\">(0;\u00a0+2)<\/p>\n<\/td>\n<td>\n<p align=\"left\">15,13<\/p>\n<\/td>\n<td>\n<p align=\"left\">359<\/p>\n<\/td>\n<td>\n<p align=\"left\">583<\/p>\n<\/td>\n<td data-colwidth=\"106\" width=\"106\">\n<p align=\"left\">\u00a0<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u00a0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"55\" width=\"55\">\n<p align=\"left\">7<\/p>\n<\/td>\n<td>\n<p align=\"left\">(-5;\u00a0-1)<\/p>\n<\/td>\n<td>\n<p align=\"left\">-15,13<\/p>\n<\/td>\n<td>\n<p align=\"left\">362<\/p>\n<\/td>\n<td>\n<p align=\"left\">150<\/p>\n<\/td>\n<td data-colwidth=\"106\" width=\"106\">\n<p align=\"left\">\u00a0<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u00a0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"55\" width=\"55\">\n<p align=\"left\">8<\/p>\n<\/td>\n<td>\n<p align=\"left\">(0;\u00a0+2)<\/p>\n<\/td>\n<td>\n<p align=\"left\">-0,11<\/p>\n<\/td>\n<td>\n<p align=\"left\">472<\/p>\n<\/td>\n<td>\n<p align=\"left\">482<\/p>\n<\/td>\n<td data-colwidth=\"106\" width=\"106\">\n<p align=\"left\">\u00a0<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u00a0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"55\" width=\"55\">\n<p align=\"left\">9<\/p>\n<\/td>\n<td>\n<p align=\"left\">(0;\u00a0+2)<\/p>\n<\/td>\n<td>\n<p align=\"left\">-0,83<\/p>\n<\/td>\n<td>\n<p align=\"left\">391<\/p>\n<\/td>\n<td>\n<p align=\"left\">361<\/p>\n<\/td>\n<td data-colwidth=\"106\" width=\"106\">\n<p align=\"left\">\u00a0<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u00a0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"55\" width=\"55\">\n<p align=\"left\">10<\/p>\n<\/td>\n<td>\n<p align=\"left\">(0;\u00a0+2)<\/p>\n<\/td>\n<td>\n<p align=\"left\">0,11<\/p>\n<\/td>\n<td>\n<p align=\"left\">473<\/p>\n<\/td>\n<td>\n<p align=\"left\">453<\/p>\n<\/td>\n<td data-colwidth=\"106\" width=\"106\">\n<p align=\"left\">326<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u00a0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"55\" width=\"55\">\n<p align=\"left\">11<\/p>\n<\/td>\n<td>\n<p align=\"left\">(0;\u00a0+2)<\/p>\n<\/td>\n<td>\n<p align=\"left\">0,83<\/p>\n<\/td>\n<td>\n<p align=\"left\">392<\/p>\n<\/td>\n<td>\n<p align=\"left\">327<\/p>\n<\/td>\n<td data-colwidth=\"106\" width=\"106\">\n<p align=\"left\">204<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u00a0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"55\" width=\"55\">\n<p align=\"left\">12<\/p>\n<\/td>\n<td>\n<p align=\"left\">(0;\u00a0+2)<\/p>\n<\/td>\n<td>\n<p align=\"left\">0,01<\/p>\n<\/td>\n<td>\n<p align=\"left\">480<\/p>\n<\/td>\n<td>\n<p align=\"left\">1839<\/p>\n<\/td>\n<td data-colwidth=\"106\" width=\"106\">\n<p align=\"left\">1713<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u00a0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"55\" width=\"55\">\n<p align=\"left\">13<\/p>\n<\/td>\n<td>\n<p align=\"left\">(0;\u00a0+2)<\/p>\n<\/td>\n<td>\n<p align=\"left\">0,009<\/p>\n<\/td>\n<td>\n<p align=\"left\">480<\/p>\n<\/td>\n<td>\n<p align=\"left\">137<\/p>\n<\/td>\n<td data-colwidth=\"106\" width=\"106\">\n<p align=\"left\">1885<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u00a0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"55\" width=\"55\">\n<p align=\"left\">14<\/p>\n<\/td>\n<td>\n<p align=\"left\">(0;\u00a0+2)<\/p>\n<\/td>\n<td>\n<p align=\"left\">-0,5<\/p>\n<\/td>\n<td>\n<p align=\"left\">422<\/p>\n<\/td>\n<td>\n<p align=\"left\">372<\/p>\n<\/td>\n<td data-colwidth=\"106\" width=\"106\">\n<p align=\"left\">188<\/p>\n<\/td>\n<td>\n<p align=\"left\">91<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u00a0\u0418\u0437 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <strong>Math<\/strong>.<strong>Pow<\/strong> \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0441\u043b\u0430\u0431\u043e \u0437\u0430\u0432\u0438\u0441\u044f\u0449\u0435\u0439 \u043e\u0442 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u044b \u0438 \u0437\u043d\u0430\u043a\u0430 \u043a\u0430\u043a \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0442\u0430\u043a \u0438 \u0441\u0442\u0435\u043f\u0435\u043d\u0435\u0439. \u0417\u0430\u043c\u0435\u0442\u043d\u043e\u0435 \u0437\u0430\u043c\u0435\u0434\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043c\u0430\u043b\u044b\u0445 \u0441\u0442\u0435\u043f\u0435\u043d\u0435\u0439, \u0431\u043b\u0438\u0437\u043a\u0438\u0445 \u043a \u043d\u0443\u043b\u044e. \u0418\u0437\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>Math<\/strong>.<strong>Pow<\/strong> \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043e\u043c \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438, \u0438 \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0441\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044f\u043c\u0438 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439.<\/p>\n<p>\u041d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u0430\u0440 \u043f\u043f. 2, 3; 5, 6; 8, 10 \u0438 9, 11 \u043c\u043e\u0436\u043d\u043e \u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f <strong>Power<\/strong> \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430 (5\u00a0\u00f7\u00a010)% \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0434\u043b\u044f \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0442\u0435\u043f\u0435\u043d\u0435\u0439, \u0447\u0442\u043e, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u043b\u0438\u0447\u0438\u0435\u043c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0432 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0442\u0435\u043f\u0435\u043d\u0435\u0439.<\/p>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043f. 4, 5 \u0438 7 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442, \u0447\u0442\u043e \u0431\u044b\u0441\u0442\u0440\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0441 X\u00a0&lt;\u00a00 \u043f\u0440\u0438 P \u043d\u0435 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0449\u0435\u043c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0443 \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u044b\u0434\u0430\u044e\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 <strong>float.NaN<\/strong> \u0443\u0441\u043a\u043e\u0440\u044f\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>Power<\/strong> \u043d\u0430 50% \u0438 \u0431\u043e\u043b\u0435\u0435. \u0424\u0443\u043d\u043a\u0446\u0438\u044f <strong>Math<\/strong>.<strong>Pow<\/strong> \u0436\u0435, \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0442\u0430\u043a\u0438\u0435 \u0441\u043b\u0443\u0447\u0430\u0438 \u0441 \u0442\u043e\u0439 \u0436\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e, \u0447\u0442\u043e \u0438 \u043f\u0440\u043e\u0447\u0438\u0435.<\/p>\n<p>\u041f\u0430\u0440\u044b \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043f\u043f. 8,9 \u0438 10, 11, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f. 12 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0437\u0430\u043c\u0435\u0434\u043b\u0435\u043d\u0438\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 <strong>Power<\/strong> \u0438 <strong>FastPower<\/strong> \u0432\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0446\u0438\u043a\u043b\u043e\u0432 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u0440\u0430\u0441\u0447\u0451\u0442\u0435 \u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0435\u043f\u0435\u043d\u0438. \u0417\u0430\u043c\u0435\u0434\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0435\u0442 5,6 \u0440\u0430\u0437\u0430 \u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u0435\u043c <strong>dp\u00a0&lt;\u00a0eLim<\/strong> \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>Power<\/strong>. \u0412\u0440\u0435\u043c\u044f \u0436\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>FastPower<\/strong> \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0442\u0438 \u0438 \u0434\u0430\u043b\u0435\u0435, \u043f\u0440\u0438 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u0438 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u043a 0 \u043a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0438\u0437 \u043f. 13. \u0412 \u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 \u0446\u0435\u043b\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 1, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0446\u0438\u043a\u043b\u044b \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430, \u0447\u0442\u043e \u0437\u0430\u043c\u0435\u0442\u043d\u043e \u043f\u0440\u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0442\u0440\u043e\u0435\u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043f\u043f. 6, 10, 11 \u0438 5, 8, 9. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u044f \u0446\u0435\u043b\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 1, \u0438 \u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u2013 \u043c\u0435\u043d\u044c\u0448\u0435 0,5(0)1 \u0437\u0430\u043c\u0435\u0434\u043b\u044f\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 <strong>Power<\/strong> \u0438 <strong>FastPower<\/strong> \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043d\u0430 (27\u00a0\u00f7\u00a030)% \u043a\u0430\u0436\u0434\u043e\u0435.<\/p>\n<p>\u0418 \u0432\u043f\u043e\u043b\u043d\u0435 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u043e, \u0444\u0443\u043d\u043a\u0446\u0438\u044f <strong>FastInvSqr<\/strong> \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043b\u0443\u0447\u0448\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0447\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u043f. 14. \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0435\u0451 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432\u044b\u0448\u0435 \u0434\u0430\u0436\u0435 \u0441\u043b\u0443\u0447\u0430\u044f, \u043a\u043e\u0433\u0434\u0430 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>Power<\/strong> \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0447\u0442\u0438 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 (\u043f. 7). \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>Math<\/strong>.<strong>Pow<\/strong> \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043f. 14 \u0438\u043c\u0435\u0435\u0442 \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u0443\u044e \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0443, \u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441 \u043f\u0440\u043e\u0447\u0438\u043c\u0438 \u0441\u0442\u0435\u043f\u0435\u043d\u044f\u043c\u0438 \u0432 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0435 (0;\u00a0+1). \u041e\u0434\u043d\u0430\u043a\u043e, \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0439\u0448\u0438\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>Math<\/strong>.<strong>Pow<\/strong> \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438.<\/p>\n<h2>\u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435   <\/h2>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u00ab\u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430\u00bb 0x3f7a3c59 \u0432 \u0432\u0438\u0434\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>Power<\/strong> \u0441 \u043e\u0431\u043b\u0430\u0441\u0442\u044c\u044e \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043e\u0431\u043e\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 <strong>(-\u221e;\u00a0+\u221e)<\/strong>, \u0438 \u0431\u043e\u043b\u0435\u0435 \u0431\u044b\u0441\u0442\u0440\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>FastPower<\/strong>, \u0441 \u043e\u0431\u043b\u0430\u0441\u0442\u044c\u044e \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <strong>X<\/strong> <strong>(0;\u00a0+\u221e)<\/strong>, \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430<strong> P (0;\u00a0+1)<\/strong>.<\/p>\n<p>\u041f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043d\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u044e\u0442 3%.<\/p>\n<p>\u0412 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043f\u043e \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e\u0439 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0435, \u0438 \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0431\u043b\u0438\u0437\u043a\u043e \u043b\u0435\u0436\u0430\u0449\u0438\u0445 \u043a 0 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u0438, \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>Power<\/strong> \u0438 <strong>FastPower<\/strong> \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0445\u043e\u0440\u043e\u0448\u0443\u044e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e <strong>Math<\/strong>.<strong>Pow<\/strong>, \u0445\u043e\u0442\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0438 \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u043b\u044e\u0431\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0445 \u0441\u0432\u043e\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432.<\/p>\n<p>\u0412 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043d\u0430 \u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0430\u043c\u0438 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u044e\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u044d\u0442\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435 \u0438\u043b\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<h2>\u0421\u0441\u044b\u043b\u043a\u0438<\/h2>\n<ol>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/companies\/infopulse\/articles\/336110\/\" rel=\"noopener noreferrer nofollow\">\u00ab\u041c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430\u00bb 0x5f3759df<\/a>   <\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/companies\/otus\/articles\/779396\/\" rel=\"noopener noreferrer nofollow\">\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0432\u043e\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0432 \u0441\u0442\u0435\u043f\u0435\u043d\u044c<\/a>   <\/p>\n<\/li>\n<\/ol>\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\/820713\/\"> https:\/\/habr.com\/ru\/articles\/820713\/<\/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>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 <a href=\"https:\/\/habr.com\/ru\/companies\/infopulse\/articles\/336110\/\" rel=\"noopener noreferrer nofollow\">\u00ab\u00ab\u041c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430\u00bb 0x5f3759df\u00bb<\/a> \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u0440\u043d\u044f, \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u00ab\u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b\u00bb, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0435\u0451 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0432 \u0446\u0435\u043b\u044f\u0445 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0447\u0438\u0441\u0435\u043b \u0432 \u043b\u044e\u0431\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438. \u0411\u044b\u043b\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0430 \u043d\u043e\u0432\u0430\u044f \u00ab\u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430\u00bb \u0438 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u043e \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0441 \u0435\u0451 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u043a\u0430\u0436\u0443 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043b\u044e\u0431\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0439 \u043d\u043e\u0432\u0443\u044e \u00ab\u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443\u00bb. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0435\u0451 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u0440\u043d\u044f, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u0438 Math.Pow.<\/p>\n<h2>\u041d\u0430 \u0437\u0430\u0442\u0440\u0430\u0432\u043a\u0443   <\/h2>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430 \u043f\u044f\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439: <\/p>\n<p>&#8212;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439;<\/p>\n<p>&#8212;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0446\u0435\u043b\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430;<\/p>\n<p>&#8212;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u044f \u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u0438;<\/p>\n<p>&#8212;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u0438;<\/p>\n<p>&#8212;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u043f\u0435\u0440\u0435\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0446\u0435\u043b\u043e\u0439 \u0438 \u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0435\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430.<\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u0440\u043d\u044f.<\/p>\n<pre><code class=\"cs\">    float FastInvSqrt(float x) {         float xhalf = 0.5f * x;         int i = *(int*)&amp;x;  \/\/ \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0431\u0438\u0442\u044b float \u0432 \u0432\u0438\u0434\u0435 \u0446\u0435\u043b\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430         i = 0x5f3759df - (i >> 1);  \/\/ \u043a\u0430\u043a\u043e\u0433\u043e \u0447\u0435\u0440\u0442\u0430 \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 ?         x = *(float*)&amp;i;         x = x*(1.5f-(xhalf*x*x));         return x;     }<\/code><\/pre>\n<p>\u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0434\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430, \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e. \u0425\u043e\u0442\u044f, \u0441\u0442\u0440\u043e\u0433\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u0433\u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430, \u0430 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043e\u0441\u043d\u043e\u0432\u0430 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u00ab\u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430\u00bb <strong>0x5f3759df<\/strong> \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u043d\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <strong>+1<\/strong>.<\/p>\n<p>\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0446\u0435\u043b\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0432 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0435 \u043d\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e, \u0437\u0430 \u043d\u0435\u0438\u043c\u0435\u043d\u0438\u0435\u043c \u0442\u0430\u043a\u043e\u0432\u043e\u0439 \u0434\u043b\u044f <strong>P\u00a0=\u00a0-1\/2<\/strong>.<\/p>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0432\u044b\u0448\u0435\u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u043e\u0433\u043e \u00ab\u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430\u00bb.<\/p>\n<p>\u0418 \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043c\u0435\u0442\u043e\u0434\u0430 \u041d\u044c\u044e\u0442\u043e\u043d\u0430. \u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0434\u0438\u0438, \u0437\u0430 \u043d\u0435\u0438\u043c\u0435\u043d\u0438\u0435\u043c \u0446\u0435\u043b\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u0438 <strong>P<\/strong>, \u043a\u0430\u043a \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u043e\u0441\u044c \u0432\u044b\u0448\u0435.<\/p>\n<h2>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u00ab\u0441\u0432\u043e\u0439 \u041b\u0443\u043d\u0430\u043f\u0430\u0440\u043a\u00bb   <\/h2>\n<p>\u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c\u0441\u044f \u0441 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043a \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c. \u0418\u0441\u043a\u043e\u043c\u0430\u044f \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u043c\u0435\u0435\u0442 \u0432\u0438\u0434<\/p>\n<p><strong>Y\u00a0=\u00a0X<sup>P<\/sup><\/strong><\/p>\n<p>\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0441\u0442\u0435\u043f\u0435\u043d\u0438 <strong>P<\/strong> \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b <strong>R<\/strong>. \u041e\u0434\u043d\u0430\u043a\u043e, \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 <strong>\u0425<\/strong> \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 <strong>P<\/strong>. \u041f\u0440\u0438 <strong>P<\/strong>, \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0449\u0435\u043c\u0443 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0443 \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b <strong>Z<\/strong>, <strong>\u0425\u00a0\u0404\u00a0(-\u221e;\u00a0+\u221e)<\/strong>. \u041d\u043e \u0434\u043b\u044f \u043f\u0440\u043e\u0447\u0438\u0445 <strong>P<\/strong> \u0438\u0437 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430\u00a0<strong>R<\/strong>, \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 <strong>X<\/strong> \u0441\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u0434\u043e <strong>(0;\u00a0+\u221e)<\/strong>. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438, \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0449\u0438\u0445 \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u0431\u0443\u0434\u0435\u0442 <strong>float.NaN<\/strong> \u2013 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u043e\u0433 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043f\u0440\u0438 <strong>P\u00a0=\u00a00<\/strong> \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 <strong>\u0425<\/strong> \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 <strong>1<\/strong>, \u0438 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0435 \u0440\u0430\u0441\u0447\u0451\u0442\u044b \u043d\u0435 \u0438\u043c\u0435\u044e\u0442 \u0441\u043c\u044b\u0441\u043b\u0430. \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e, \u043f\u0440\u0438 <strong>P\u00a0=\u00a01<\/strong> \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 <strong>X<\/strong>.<\/p>\n<p>\u041e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 <strong>X\u00a0=\u00a00<\/strong>. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0434\u043b\u044f \u043b\u044e\u0431\u044b\u0445 <strong>P\u00a0&lt;\u00a00 <\/strong>\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u044b\u043c. \u0412 \u0434\u0435\u0431\u0440\u044f\u0445 \u043c\u0430\u0442\u0430\u043d\u0430 \u0438 \u0444\u0443\u043d\u043a\u0430\u043d\u0430 \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043f\u043e\u0441\u044b\u043b \u0441\u0432\u043e\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439, \u043f\u043e \u044d\u0442\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0432\u043e\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f <strong>0<\/strong> \u0432 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <strong>float.PositiveInfinity<\/strong>, \u0442\u043e \u0435\u0441\u0442\u044c <strong>+\u221e<\/strong>.<\/p>\n<p>\u041f\u0440\u0438 <strong>X\u00a0=\u00a00<\/strong> \u0434\u043b\u044f <strong>P\u00a0>\u00a00<\/strong> \u0434\u0435\u043b\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0449\u0435, \u0438 \u0437\u0434\u0435\u0441\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u043c <strong>0<\/strong>.<\/p>\n<p>\u0423\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0432\u044b\u0448\u0435\u0438\u0437\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0435, \u044f \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 (\u0438 \u043e\u0434\u043d\u043e \u0432 \u0442\u0435\u043b\u0435) \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<p>&#8212;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 <strong>1<\/strong> \u043f\u0440\u0438 <strong>P\u00a0=\u00a00<\/strong>;<\/p>\n<p>&#8212;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 <strong>X<\/strong> \u043f\u0440\u0438 <strong>P\u00a0=\u00a01<\/strong>;<\/p>\n<p>&#8212;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 <strong>float.PositiveInfinity<\/strong> \u043f\u0440\u0438 <strong>X\u00a0=\u00a00<\/strong> \u0438 <strong>P\u00a0&lt;\u00a00<\/strong>;<\/p>\n<p>&#8212;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 <strong>0<\/strong> \u043f\u0440\u0438 <strong>X\u00a0=\u00a00<\/strong> \u0438 <strong>P\u00a0>\u00a00<\/strong>;<\/p>\n<p>&#8212;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 <strong>float.NaN<\/strong> \u043f\u0440\u0438 <strong>X\u00a0&lt;\u00a00<\/strong> \u0434\u043b\u044f \u0432\u0441\u0435\u0445 <strong>P<\/strong>, \u043d\u0435 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0449\u0438\u0445 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0443 \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b <strong>Z<\/strong>.<\/p>\n<p>\u0412 \u0445\u043e\u0434\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0440\u0430\u0441\u0447\u0451\u0442\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0434\u0432\u0443\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u044f <strong>P\u00a0>\u00a00<\/strong> \u0438 <strong>P\u00a0&lt;\u00a00<\/strong>. \u041e\u0431 \u044d\u0442\u043e\u043c \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0434\u0430\u043b\u0435\u0435.<\/p>\n<p>\u00a0\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u044d\u0442\u0430\u043f\u043e\u043c, \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043c \u0441\u0442\u0435\u043f\u0435\u043d\u044c <strong>P<\/strong> \u043d\u0430 \u0446\u0435\u043b\u0443\u044e \u0447\u0430\u0441\u0442\u044c <strong>c<\/strong> \u0438 \u0434\u0440\u043e\u0431\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c <strong>dp<\/strong> \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u043c \u0448\u0430\u0433\u0435 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b <strong>X<sup>P<\/sup>\u00a0=\u00a0X<sup>c<\/sup>\u00d7X<sup>dp<\/sup><\/strong>.<\/p>\n<p>\u0426\u0435\u043b\u0430\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u044c <strong>X<sup>c<\/sup><\/strong> \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0441\u0442\u043e\u043c \u0446\u0438\u043a\u043b\u0435 <strong>for\u00a0(int\u00a0n\u00a0=\u00a01;\u00a0n\u00a0&lt;=\u00a0c;\u00a0n++)<\/strong>, \u0438 \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0442\u044c \u0437\u0434\u0435\u0441\u044c \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043d\u0435\u0447\u0435\u0433\u043e. \u0412\u0441\u0451 \u00ab\u0432\u043e\u043b\u0448\u0435\u0431\u0441\u0442\u0432\u043e\u00bb \u0442\u0435\u0445 \u0441\u0430\u043c\u044b\u0445 \u00ab\u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0447\u0438\u0441\u0435\u043b\u00bb \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u0440\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0438 \u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 <strong>X<sup>dp<\/sup><\/strong>.<\/p>\n<p>\u0418 \u0437\u0434\u0435\u0441\u044c \u043c\u044b \u0441\u0440\u0430\u0437\u0443 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0432\u0441\u0451 \u0442\u043e \u043a\u043e\u043b\u0434\u0443\u043d\u0441\u0442\u0432\u043e, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044f \u0432\u0437\u044f\u043b \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0439. \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u044f \u0432\u0437\u044f\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u0442\u0442\u0443\u0434\u0430, \u0430 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443 <strong>MN\u00a0=\u00a00x3f7a3bea<\/strong>, \u0431\u0430\u0437\u0438\u0440\u0443\u044e\u0449\u0443\u044e\u0441\u044f \u043d\u0430 <strong>\u03c3\u00a0=\u00a00,0450465<\/strong> \u044f \u0437\u0430\u043c\u0435\u043d\u0438\u043b \u043d\u0430 <strong>MN\u00a0=\u00a00x3f7a3\u044159<\/strong>, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043d\u0430 <strong>\u03c3\u00a0=\u00a00,0450333<\/strong>. \u0413\u0434\u0435-\u0442\u043e \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0440\u0430\u0445 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 \u044f \u043f\u0440\u043e\u0447\u0451\u043b, \u0447\u0442\u043e \u0442\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u043b\u0443\u0447\u0448\u0435, \u0442\u0430\u043a \u0447\u0442\u043e \u043e\u0441\u0442\u0430\u0432\u043b\u044e \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u043d\u0430\u0440\u043e\u0434\u0443 \u0434\u043b\u044f \u0432\u0435\u0441\u0451\u043b\u044b\u0445 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0445\u043e\u043b\u0438\u0432\u0430\u0440\u043e\u0432.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u043f\u0435\u0440\u0432\u043e\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f <strong>X<sup>dp<\/sup><\/strong> \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"cs\">    FIBUnion y = new FIBUnion();     y.fVal = x;     y.iVal = (int)(MN + dp * (y.iVal - MN));     float ty = y.fVal;<\/code><\/pre>\n<p>\u0433\u0434\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 <strong>FIBUnion<\/strong> \u0437\u0430\u0434\u0430\u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"cs\">    public struct FIBUnion     {         [FieldOffset(0)]         public float fVal;          [FieldOffset(0)]         public int iVal;          [FieldOffset(0)]         public bool bVal;     }<\/code><\/pre>\n<p>\u041e\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u043e\u0434\u043d\u043e\u0439 \u0438 \u0442\u043e\u0439 \u0436\u0435 \u044f\u0447\u0435\u0439\u043a\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 32 \u0431\u0438\u0442\u0430 \u043a\u0430\u043a \u043a \u0440\u0430\u0437\u043d\u044b\u043c \u0442\u0438\u043f\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u2013 float, int \u0438\u043b\u0438 bool.<\/p>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435, \u0432 <strong>ty<\/strong> \u0438\u043c\u0435\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u044f <strong>X<sup>dp<\/sup><\/strong>.<\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u044d\u0442\u0430\u043f\u043e\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430, \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u043c\u0435\u0442\u043e\u0434 \u041d\u044c\u044e\u0442\u043e\u043d\u0430, \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0430\u0432\u0442\u043e\u0440\u0430\u043c \u043f\u0440\u043e\u0447\u0438\u0445 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0445 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432.<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0444\u043e\u0440\u043c\u0443\u043b\u0443 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u044f.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u0438\u0441\u0445\u043e\u0434\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e <strong>Y\u00a0=\u00a0X<sup>P<\/sup><\/strong> \u043f\u0435\u0440\u0435\u043f\u0438\u0448\u0435\u043c \u0432 \u0432\u0438\u0434\u0435 <strong>Y<sup>1\/P<\/sup>\u00a0\u2013\u00a0X\u00a0=\u00a00<\/strong>. \u041a\u0441\u0442\u0430\u0442\u0438, \u0443\u0436\u0435 \u043e\u0442\u0441\u044e\u0434\u0430 \u0441\u043b\u0435\u0434\u0443\u0435\u0442, \u0447\u0442\u043e \u0441\u043b\u0443\u0447\u0430\u0439 \u0441 <strong>P\u00a0=\u00a00<\/strong> \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0434\u043e \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0443\u0447\u0430\u0441\u0442\u043a\u0430 \u043a\u043e\u0434\u0430. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, <strong>f(Y)\u00a0=\u00a0Y<sup>1\/P<\/sup>\u00a0\u2013\u00a0X<\/strong>, \u0438 <strong>f\u2019(Y)\u00a0=\u00a0(1\/P)\u00d7Y<sup>(1\/P-1)<\/sup><\/strong>.<\/p>\n<p>\u0418\u0442\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0444\u043e\u0440\u043c\u0443\u043b\u0430 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a <strong>Y<sub>n+1<\/sub>\u00a0=\u00a0Y<sub>n<\/sub>\u00a0\u2013\u00a0f(Y<sub>n<\/sub>)\/f\u2019(Y<sub>n<\/sub>)<\/strong>.<\/p>\n<p>\u041f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0432 \u043d\u0430\u0448\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f <strong>f(Y)<\/strong> \u0438 <strong>f\u2019(Y)<\/strong>, \u0438 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0432 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0444\u043e\u0440\u043c\u0443\u043b\u044b \u0434\u043b\u044f \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430:<\/p>\n<p>\u00a0<strong>Res\u00a0=\u00a0Y\u00d7(1+P\u00d7(X\/Y<sup>(1\/P)<\/sup>-1))<\/strong>.<\/p>\n<p>\u00a0\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u044b \u0431\u0443\u0434\u0443\u0442 <strong>Y\u00a0=\u00a0ty<\/strong>, \u0438 <strong>P\u00a0=\u00a0dp<\/strong>, \u0438 \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0442 \u0432\u0438\u0434:<\/p>\n<p>\u00a0<strong>Res\u00a0=\u00a0ty\u00d7(1+dp\u00d7(X\/ty<sup>(1\/dp)<\/sup>-1))<\/strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 (1)<\/p>\n<p>\u00a0\u0418 \u0437\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u0437\u0430\u0431\u0430\u0432\u043d\u044b\u0439 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <strong>Y\u00a0=\u00a0X<sup>P<\/sup><\/strong> \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c <strong>g(Y)\u00a0=\u00a0ty<sup>(1\/dp)<\/sup><\/strong>.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c <strong>q\u00a0=\u00a01\/dp<\/strong>, \u0442\u043e <strong>g(Y)\u00a0=\u00a0ty<sup>q<\/sup><\/strong>, \u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442 \u0432 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u044e.<\/p>\n<p>\u0418 \u043d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u0446\u0435\u043b\u044c \u0432\u0441\u0435\u0433\u043e \u043c\u0435\u0440\u043e\u043f\u0440\u0438\u044f\u0442\u0438\u044f \u2013 <strong>\u0431\u044b\u0441\u0442\u0440\u043e\u0435<\/strong> \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 <strong>\u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0451\u043d\u043d\u043e\u0433\u043e<\/strong> \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0447\u0438\u0441\u043b\u0430, \u0430 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0432\u043c\u0435\u0441\u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u043b\u043e\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0439 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <strong>ty<sup>q<\/sup><\/strong> \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0442\u043e\u043c\u0443, \u043a\u0430\u043a \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 <strong>X<sup>P<\/sup><\/strong>.<\/p>\n<p>\u0420\u0430\u0437\u043b\u043e\u0436\u0438\u043c <strong>q<\/strong> \u043d\u0430 \u0446\u0435\u043b\u0443\u044e <strong>c<\/strong> \u0438 \u0434\u0440\u043e\u0431\u043d\u0443\u044e <strong>inv<\/strong> \u0447\u0430\u0441\u0442\u044c. \u0426\u0435\u043b\u0443\u044e \u0441\u0442\u0435\u043f\u0435\u043d\u044c <strong>ty<sup>c<\/sup><\/strong> \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u043c, \u043a\u0430\u043a \u0438 \u0440\u0430\u043d\u0435\u0435, \u0432 \u0446\u0438\u043a\u043b\u0435, \u0430 \u043f\u0435\u0440\u0432\u043e\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u0435 \u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 <strong>ty<sup>inv<\/sup><\/strong> \u0441\u043d\u043e\u0432\u0430 \u043f\u043e\u043b\u044c\u0437\u0443\u044f\u0441\u044c \u00ab\u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0447\u0438\u0441\u043b\u043e\u043c\u00bb:<\/p>\n<pre><code class=\"cs\">    y.iVal = (int)(MN + inv * (y.iVal - MN));     inv = y.fVal;<\/code><\/pre>\n<p>\u0412 <strong>inv<\/strong> \u0438\u043c\u0435\u0435\u043c \u043f\u0435\u0440\u0432\u043e\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u0440\u043e\u0431\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0435\u043f\u0435\u043d\u0438 <strong>1\/dp<\/strong>, \u043d\u0430 \u0447\u0451\u043c \u044f \u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0441\u044f, \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0432, \u0447\u0442\u043e \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0435 \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u044f \u0441\u0438\u043b\u044c\u043d\u043e \u0437\u0430\u043c\u0435\u0434\u043b\u044f\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0432\u044b\u0433\u043e\u0434\u044b \u043d\u0435 \u0434\u0430\u0434\u0443\u0442. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u044f \u043e\u0441\u0442\u0430\u0432\u0438\u043b \u043d\u0430 \u0431\u0443\u0434\u0443\u0449\u0438\u0435 \u0442\u0435\u0441\u0442\u044b \u0433\u043e\u0442\u043e\u0432\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0442 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0434\u0430\u043b\u0435\u0435.<\/p>\n<p>\u041e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0432\u043e\u0435\u0434\u0438\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <strong>ty<sup>(1\/dp)<\/sup><\/strong>, \u0434\u0430\u043b\u0435\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435 <strong>(1)<\/strong> \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <strong>X<sup>dp<\/sup><\/strong>, \u0438 \u0434\u0430\u043b\u0435 \u0438\u0441\u043a\u043e\u043c\u043e\u0435 <strong>X<sup>P<\/sup><\/strong>.<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044f \u044d\u0442\u043e\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c. \u0412\u044b\u0448\u0435\u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0435 \u0446\u0438\u043a\u043b\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0446\u0435\u043b\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0435\u0439 <strong>X<sup>P<\/sup><\/strong> \u0438 <strong>ty<sup>q<\/sup><\/strong> \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f <strong>P\u00a0>\u00a00<\/strong>, \u0442\u0430\u043a \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435. \u0414\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0442\u0435\u0445 \u0436\u0435 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u043f\u0440\u0438 <strong>P\u00a0&lt;\u00a00<\/strong> \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043b\u0438\u0431\u043e \u043f\u0435\u0440\u0435\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0445 \u0432\u0435\u043b\u0438\u0447\u0438\u043d, \u043b\u0438\u0431\u043e \u0434\u0435\u043b\u0435\u043d\u0438\u044f. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u044d\u0442\u043e \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0435\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u044f \u0435\u0433\u043e \u0443\u0436\u0435 \u043d\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043d\u0430 \u0434\u0432\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0443\u0447\u0430\u0441\u0442\u043a\u0430. \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0432 \u0446\u0438\u043a\u043b\u0435 \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u043e \u0437\u0430\u043c\u0435\u0434\u043b\u0438\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0434\u043b\u044f \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0441 <strong>P\u00a0&lt;\u00a00<\/strong>.<\/p>\n<p>\u042f \u043f\u0440\u0438\u043d\u044f\u043b \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0438\u0441\u043a\u0430\u0442\u044c <strong>X<sup>c<\/sup><\/strong> \u0438 <strong>X<sup>dp<\/sup><\/strong> \u0441 <strong>c<\/strong>\u00a0 \u0438 <strong>dp<\/strong> , \u0432\u0437\u044f\u0442\u044b\u043c\u0438 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e, \u0430 \u0437\u0430\u0442\u0435\u043c, \u043f\u0440\u0438 <strong>P\u00a0&lt;\u00a00<\/strong>, \u0432\u0437\u044f\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430.<\/p>\n<p>\u042d\u0442\u043e, \u043d\u0435 \u043e\u0442\u043c\u0435\u043d\u0438\u043b\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0440\u0430\u0437\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u043e \u0434\u0432\u0443\u043c \u0432\u0435\u0442\u0432\u044f\u043c \u0434\u043b\u044f <strong>P\u00a0&lt;\u00a00<\/strong> \u0438 <strong>P\u00a0>\u00a00<\/strong>, \u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0432\u0438\u043d\u0443\u043b\u043e \u0435\u0433\u043e \u0431\u043b\u0438\u0436\u0435 \u043a \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430. \u042d\u0442\u0438 \u0434\u0432\u0435 \u0432\u0435\u0442\u0432\u0438 \u0438\u043c\u0435\u044e\u0442 \u043f\u0440\u043e\u0442\u044f\u0436\u0451\u043d\u043d\u044b\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0435\u0441\u044f \u0443\u0447\u0430\u0441\u0442\u043a\u0438 \u043a\u043e\u0434\u0430, \u043e\u0434\u043d\u0430\u043a\u043e, \u0432\u044b\u0434\u0435\u043b\u044f\u0442\u044c \u0438\u0445 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0438\u043b\u0438 \u043e\u0431\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u043c\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430\u043c\u0438 \u044f \u043d\u0435 \u0441\u0442\u0430\u043b, \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430 \u00ab\u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u00a0>\u00a0\u0440\u0430\u0437\u043c\u0435\u0440\u00bb.<\/p>\n<p>\u0412 \u0445\u043e\u0434\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430 \u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0434\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u044f \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u044e <a href=\"https:\/\/habr.com\/ru\/companies\/otus\/articles\/779396\/\" rel=\"noopener noreferrer nofollow\">\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0432\u043e\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0432 \u0441\u0442\u0435\u043f\u0435\u043d\u044c<\/a>. \u0418\u0437 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u044f \u0432\u044b\u0431\u0440\u0430\u043b \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0446\u0435\u043b\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438, \u0437\u0430\u043c\u0435\u043d\u0438\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0446\u0438\u043a\u043b\u044b \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f. \u0422\u0430\u043a \u043a\u0430\u043a \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u0447\u0438\u0441\u0435\u043b \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u0435\u0441\u044c\u043c\u0430 \u0437\u0430\u0442\u0440\u0430\u0442\u043d\u044b\u043c\u0438 \u043f\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043d\u043e\u043c\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u044f \u0441\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0439 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0434\u043b\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u0435\u0439 0 \u2013 5 \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0430, \u043d\u043e \u0441 \u0440\u043e\u0441\u0442\u043e\u043c \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0440\u0435\u0437\u043a\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u0435\u0442. \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u043b \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0434\u0432\u0443\u043a\u0440\u0430\u0442\u043d\u043e\u0435 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u0438 15 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0446\u0438\u043a\u043b\u0430 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0439.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430 \u0432 \u0446\u0435\u043b\u044f\u0445 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0435\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u0432\u0435\u0442 \u0443\u0432\u0438\u0434\u0435\u043b\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f <strong>Power(float\u00a0x,\u00a0float\u00a0p)<\/strong>:<\/p>\n<pre><code class=\"cs\">    \/\/ \u0431\u044b\u0441\u0442\u0440\u043e\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 p \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0445 c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430\u043c\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432     public static float Power(float x, float p)     {         const float eLim = 0.01f;       \/\/ \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0430\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0441 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u043e\u0439         const int MN = 0x3f7a3c59;          \/\/ \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439         if (p == 0) return 1;           \/\/ \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u0435 \u0434\u043b\u044f p = 0         if (p == 1) return x;           \/\/ \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u0435 \u0434\u043b\u044f p = 1         \/\/if (x &lt; 0) return float.NaN;  \/\/ \u0434\u043b\u044f \u0446\u0435\u043b\u044b\u0445 p \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u043d\u0435 \u0432\u0435\u0440\u043d\u043e, \u0441\u043c. \u0434\u0430\u043b\u0435\u0435         if (x == 0)                     \/\/ \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u043b\u044f x = 0         {             if (p &lt; 0) return float.PositiveInfinity;             else return 0;         }          float dp;         \/\/ c + dp = |p|, \u0433\u0434\u0435 c - \u0446\u0435\u043b\u043e\u0435, \u0430 dp - \u0434\u0440\u043e\u0431\u043d\u044b\u0439 \u043e\u0441\u0442\u0430\u0442\u043e\u043a         int c = (int)p;         if (p &lt; 0)         {             dp = c - p; \/\/ dp >= 0             c = ~(--c); \/\/ |c| >= 0         }         else dp = p - c; \/\/<\/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-378544","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/378544","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=378544"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/378544\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=378544"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=378544"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=378544"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}