{"id":327527,"date":"2022-01-10T08:55:46","date_gmt":"2022-01-10T08:55:46","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=327527"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=327527","title":{"rendered":"<span>\u041e\u0447\u0435\u043d\u044c \u0442\u0438\u043f\u043e\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e! \u041a\u043e\u043d\u0446\u0435\u043f\u0442 \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u043e\u0439 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0435\u0434\u0438\u043d\u0438\u0446 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0441 generic math \u0434\u043b\u044f .NET<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\" class=\"article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442!<\/p>\n<p>\u0425\u043e\u0447\u0443 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u043a\u043e\u043d\u0446\u0435\u043f\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0435\u0434\u0438\u043d\u0438\u0446 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0441 \u043f\u043e\u043b\u043d\u043e\u0439 \u0442\u0438\u043f\u043e\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c\u044e, \u0445\u043e\u0440\u043e\u0448\u0435\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u043f\u043e\u043b\u043d\u043e\u0439 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u043e\u0441\u0442\u044c\u044e!<\/p>\n<p>\u0414\u043b\u044f \u043d\u0435\u0442\u0435\u0440\u043f\u0435\u043b\u0438\u0432\u044b\u0445: <a href=\"https:\/\/github.com\/WhiteBlackGoose\/UnitsOfMeasure\" rel=\"noopener noreferrer nofollow\">github<\/a>.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"\/img\/image-loader.svg\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b\" title=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b\" height=\"201\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/698\/073\/8a8\/6980738a8dc3fc98e5cc43ade87c472c.png\" data-width=\"719\"\/><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b<\/figcaption><\/figure>\n<p>\u0415\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0434\u043b\u044f <abbr title=\"\u0415\u0434\u0438\u043d\u0438\u0446(\u044b)(\u0430) \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f\">\u0415\u0418<\/abbr>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/github.com\/angularsen\/UnitsNet\" rel=\"noopener noreferrer nofollow\">UnitsNet<\/a> \u0438 <a href=\"https:\/\/docs.microsoft.com\/en-us\/dotnet\/fsharp\/language-reference\/units-of-measure\" rel=\"noopener noreferrer nofollow\">Units of Measure in F#<\/a>. \u041e\u0431\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u0441\u0432\u043e\u044e \u0440\u0430\u0431\u043e\u0442\u0443. \u041d\u043e \u043c\u044b \u0437\u0434\u0435\u0441\u044c \u0431\u0443\u0434\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443. \u0410 \u0435\u0449\u0435 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044e \u0415\u0418.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u043f\u043e\u0433\u043d\u0430\u043b\u0438.<\/p>\n<h2>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h2>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u044b \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0434\u0435\u043b\u0438\u043c \u0415\u0418 \u043d\u0430 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u044b. \u0423 \u043d\u0430\u0441 \u043d\u0435\u0442 \u0434\u043b\u0438\u043d, \u0434\u0438\u0441\u0442\u0430\u043d\u0446\u0438\u0439, \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043c\u0430\u0441\u0441\u044b, \u043f\u043b\u043e\u0449\u0430\u0434\u0438, \u0438 \u0442. \u0434. \u041d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0443 \u043a\u0430\u0436\u0434\u043e\u0439 \u0415\u0418 \u0435\u0441\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u0430\u044f \u0415\u0418 \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>\u0423 \u0415\u0418 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u044e\u0431\u0430\u044f \u0431\u0430\u0437\u043e\u0432\u0430\u044f \u0415\u0418. \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u044f \u0431\u0443\u0434\u0443 \u0431\u0440\u0430\u0442\u044c \u0421\u0418 \u043a\u0430\u043a \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0415\u0418. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u043a\u0438\u043b\u043e\u043c\u0435\u0442\u0440\u0430 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0415\u0418 \u0431\u0443\u0434\u0435\u0442 \u043c\u0435\u0442\u0440 (1000 \u043c\u0435\u0442\u0440\u043e\u0432 \u0432 \u043a\u0438\u043b\u043e\u043c\u0435\u0442\u0440\u0435). \u0414\u043b\u044f \u0433\u0440\u0430\u043c\u043c\u0430 &#8212; \u043a\u0438\u043b\u043e\u0433\u0440\u0430\u043c\u043c (0.001 \u043a\u0433 \u0432 \u0433). \u0414\u043b\u044f \u043c\u0435\u0442\u0440\u0430 \u0431\u0430\u0437\u043e\u0432\u0430\u044f \u0415\u0418 &#8212; \u0442\u043e\u0436\u0435 \u043c\u0435\u0442\u0440 (1:1).<\/p>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0415\u0418:<\/p>\n<pre><code class=\"cs\">public interface IBaseUnit&lt;T, TNumber> {     TNumber Base { get; }     string Postfix { get; } }<\/code><\/pre>\n<p>Base &#8212; \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0415\u0418 \u0432 \u043d\u0430\u0448\u0435\u0439. Postfix &#8212; \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0430 \u043c\u0438\u043d\u0443\u0442\u0430:<\/p>\n<pre><code class=\"cs\">public struct Minute&lt;TNumber> : IBaseUnit&lt;Second&lt;TNumber>, TNumber> where TNumber : IMultiplicativeIdentity&lt;TNumber, TNumber>, IParseable&lt;TNumber> {     public string Postfix => \"min\";     public TNumber Base => Constants&lt;TNumber>.Number60; }<\/code><\/pre>\n<p>TNumber \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/preview-features-in-net-6-generic-math\/\" rel=\"noopener noreferrer nofollow\">generic math<\/a>.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u0447\u0442\u043e \u043d\u0430\u0441\u0447\u0435\u0442 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439? \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0434\u043b\u044f \u043d\u0438\u0445 \u0442\u043e\u0436\u0435 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0438 \u0435\u0434\u0438\u043d\u0438\u0446\u044b \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u043e\u0442 \u0442\u0430\u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e <a href=\"https:\/\/github.com\/WhiteBlackGoose\/UnitsOfMeasure\/blob\/296c8e3846de47dd5b695df120ca76da9e73942f\/Sources\/UnitsOfMeasure\/PredefinedUnits.Arithmetics.cs#L14\" rel=\"noopener noreferrer nofollow\">\u0434\u0435\u043b\u0435\u043d\u0438\u0435<\/a>:<\/p>\n<pre><code class=\"cs\">public struct Div&lt;T1, T2, T1Base, T2Base, TNumber>     : IBaseUnit&lt;Div&lt;T1Base, T2Base, T1Base, T2Base, TNumber>, TNumber>     where T1Base : struct, IBaseUnit&lt;T1Base, TNumber>     where T2Base : struct, IBaseUnit&lt;T2Base, TNumber>     where T1 : struct, IBaseUnit&lt;T1Base, TNumber>     where T2 : struct, IBaseUnit&lt;T2Base, TNumber>     where TNumber : IDivisionOperators&lt;TNumber, TNumber, TNumber> {     public TNumber Base => new T1().Base \/ new T2().Base;     public string Postfix => $\"({new T1().Postfix}\/{new T2().Postfix})\"; }<\/code><\/pre>\n<p>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0436\u0438\u0440\u043d\u043e\u0432\u0430\u0442\u043e\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435, \u043d\u043e \u043d\u0435 \u0432 \u0442\u043e\u043c \u0441\u0443\u0442\u044c. <code>Div<\/code> \u0442\u0430\u043a \u0436\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 <code>IBaseUnit<\/code> \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043f\u0440\u0438\u0447\u0435\u043c \u0431\u0430\u0437\u043e\u0432\u0430\u044f \u0415\u0418 \u0434\u043b\u044f \u043d\u0435\u0433\u043e &#8212; \u044d\u0442\u043e \u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u0415\u0418 \u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044f \u0438 \u0437\u043d\u0430\u043c\u0435\u043d\u0430\u0442\u0435\u043b\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0415\u0418 <code>\u043a\u043c\/\u043c\u0438\u043d<\/code> \u0431\u0430\u0437\u043e\u0432\u0430\u044f \u0415\u0418 &#8212; <code>\u043c\/\u0441<\/code>.<\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0442\u0430\u043a\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0441\u0430\u043c\u0438\u0445 \u0435\u0434\u0438\u043d\u0438\u0446 \u0438 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0432\u0435\u043b\u0438\u0447\u0438\u043d, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043b\u0435\u0433\u043a\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e \u0432 \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e \u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438, \u0447\u0442\u043e \u0431\u0430\u0437\u043e\u0432\u0430\u044f \u0415\u0418 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"\/img\/image-loader.svg\" alt=\"\u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044f \u0435\u0434\u0438\u043d\u0438\u0446 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0441 \u043e\u0431\u0449\u0435\u0439 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0415\u0418\" title=\"\u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044f \u0435\u0434\u0438\u043d\u0438\u0446 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0441 \u043e\u0431\u0449\u0435\u0439 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0415\u0418\" height=\"352\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0ea\/2de\/737\/0ea2de737cf81614bbddf2d2506ecc09.png\" data-width=\"875\"\/><figcaption>\u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044f \u0435\u0434\u0438\u043d\u0438\u0446 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0441 \u043e\u0431\u0449\u0435\u0439 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0415\u0418<\/figcaption><\/figure>\n<p>\u0422. \u0435. \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u043c \u043e\u0434\u043d\u0443 \u0438 \u0442\u0443 \u0436\u0435 \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u0415\u0418, \u0438 \u043e\u0442\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u044f\u0441\u044c \u043e\u0442 \u043d\u0435\u0435 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u043b\u044e\u0431\u0443\u044e \u0432 \u043b\u044e\u0431\u0443\u044e. \u0410 \u0435\u0441\u043b\u0438 \u0431\u0430\u0437\u043e\u0432\u0430\u044f \u0415\u0418 \u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442, \u0437\u043d\u0430\u0447\u0438\u0442 \u043d\u0435\u043b\u044c\u0437\u044f \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c!<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"\/img\/image-loader.svg\" alt=\"\u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044f \u0438\u0437 \u043c\u0435\u0442\u0440\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u044b \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430\" title=\"\u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044f \u0438\u0437 \u043c\u0435\u0442\u0440\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u044b \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430\" height=\"300\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d4b\/a29\/d9b\/d4ba29d9b1356e0cc3cdf6dc505050bd.png\" data-width=\"844\"\/><figcaption>\u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044f \u0438\u0437 \u043c\u0435\u0442\u0440\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u044b \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430<\/figcaption><\/figure>\n<p>\u041f\u043e\u0434\u043e\u0431\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c, \u0442\u0440\u0435\u0431\u0443\u044f \u043e\u0434\u043d\u0443 \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u0415\u0418, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/github.com\/WhiteBlackGoose\/UnitsOfMeasure\/blob\/296c8e3846de47dd5b695df120ca76da9e73942f\/Sources\/UnitsOfMeasure\/Operations.cs#L19\" rel=\"noopener noreferrer nofollow\">\u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/a>. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 + \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u0442\u0430\u043a \u043a\u0430\u043a \u0443 \u043d\u0430\u0441 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c generic \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u0435\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f (extension method):<\/p>\n<pre><code class=\"cs\">[MethodImpl(MethodImplOptions.AggressiveInlining)] public static Unit&lt;T1, TBase, TNumber>      Add&lt;T1, T2, TBase, TNumber>(this Unit&lt;T1, TBase, TNumber> a, Unit&lt;T2, TBase, TNumber> b)     where T1 : IBaseUnit&lt;TBase, TNumber>     where T2 : IBaseUnit&lt;TBase, TNumber>     \/\/ \u0443\u0431\u0440\u0430\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e constraint-\u043e\u0432 \u0434\u043b\u044f \u043e\u0431\u043b\u0435\u0433\u0447\u0435\u043d\u0438\u044f \u0447\u0442\u0435\u043d\u0438\u044f     =>          typeof(T1) == typeof(T2)         ? new(a.Float + b.Float)         : new((a.Float * new T1().Base + b.Float * new T2().Base) \/ new T1().Base);<\/code><\/pre>\n<p>\u0422\u0430\u043a\u043e\u0439 \u043c\u0435\u0442\u043e\u0434 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u043c\u0435\u0442\u043e\u0434\u044b \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0415\u0418 \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0441\u0430\u043c\u0438 \u0415\u0418 \u0440\u0430\u0437\u043d\u044b\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, 20 \u0441\u0435\u043a\u0443\u043d\u0434 + 1 \u043c\u0438\u043d\u0443\u0442\u0430 = 80 \u0441\u0435\u043a\u0443\u043d\u0434. 1 \u043a\u043c + 1 \u043c\u0438\u043b\u044f = 2.6 \u043a\u043c. \u041d\u043e \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u0441\u043b\u043e\u0436\u0438\u0442\u044c \u0441\u0435\u043a\u0443\u043d\u0434\u044b \u0438 \u043c\u0435\u0442\u0440\u044b \u043d\u0435 \u0443\u0434\u0430\u0441\u0442\u0441\u044f (\u043d\u0435 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f).<\/p>\n<p>\u041f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b.<\/p>\n<h2>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0440\u0430\u0431\u043e\u0442\u044b<\/h2>\n<p>\u0412\u0441\u0435 \u043f\u043e\u0434\u0440\u044f\u0434:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"\/img\/image-loader.svg\" alt=\"\u0411\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b\" title=\"\u0411\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b\" height=\"340\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e1b\/adb\/fcc\/e1badbfccefe55110bcfbcf51adcfaf2.png\" data-width=\"875\"\/><figcaption>\u0411\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b<\/figcaption><\/figure>\n<p>\u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 C#, \u0432 F# \u0435\u0441\u0442\u044c generic \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b, \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u0438\u0445 \u043d\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c?<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"\/img\/image-loader.svg\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432 F#\" title=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432 F#\" height=\"578\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b17\/4fe\/493\/b174fe493122d1d86c8883b9d8a6771d.png\" data-width=\"875\"\/><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432 F#<\/figcaption><\/figure>\n<p>\u041a\u0430\u043a \u043c\u044b \u043f\u043e\u043c\u043d\u0438\u043c, \u0432\u0441\u0435 \u0434\u0435\u043b\u0430\u043b\u043e\u0441\u044c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 generic math. \u0422\u043e \u0435\u0441\u0442\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0442\u0438\u043f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u0437\u044f\u0442\u044c <a href=\"https:\/\/www.nuget.org\/packages\/AngouriMath.Experimental\" rel=\"noopener noreferrer nofollow\">AngouriMath.Experimental<\/a>, \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f <a href=\"https:\/\/github.com\/asc-community\/AngouriMath\" rel=\"noopener noreferrer nofollow\">AngouriMath<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b generic math.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"\/img\/image-loader.svg\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e\u0439 \u0430\u043b\u0433\u0435\u0431\u0440\u044b \u0441 \u043d\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0415\u0418\" title=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e\u0439 \u0430\u043b\u0433\u0435\u0431\u0440\u044b \u0441 \u043d\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0415\u0418\" height=\"470\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1ef\/e2a\/f41\/1efe2af418e3ba860c0f20a51574616d.png\" data-width=\"1254\"\/><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e\u0439 \u0430\u043b\u0433\u0435\u0431\u0440\u044b \u0441 \u043d\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0415\u0418<\/figcaption><\/figure>\n<h2>\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c<\/h2>\n<p>\u041d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043f\u043b\u043e\u0445\u043e. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043e\u0432\u0435\u0440\u0445\u0435\u0434 \u043d\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e JIT \u043d\u0435 \u043f\u0440\u043e\u043c\u043e\u0443\u0442\u0438\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0441 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u043f\u043e\u043b\u0435\u043c \u043f\u043e\u043a\u0430 \u0447\u0442\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0441\u043b\u0438 \u0441 float-\u0430\u043c\u0438 \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0438\u0437 \u0447\u0435\u0440\u0435\u0437 xmm \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b, \u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u044e\u043d\u0438\u0442\u0430 \u0432 \u043f\u0430\u043c\u044f\u0442\u044c, \u043f\u043e\u0442\u043e\u043c \u0432\u044b\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043d\u0430 xmm, \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e, \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0441 \u043e\u0431\u0435\u0440\u0442\u043e\u0447\u043d\u044b\u043c \u0442\u0438\u043f\u043e\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0434\u0430 \u0438 \u043f\u043e\u0442\u0435\u0440\u044f\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f &#8212; \u044d\u0442\u043e \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0434\u043e\u043b\u0435\u0439 \u043d\u0430\u043d\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u044b \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438. <a href=\"https:\/\/github.com\/WhiteBlackGoose\/UnitsOfMeasure#efficiency\" rel=\"noopener noreferrer nofollow\">\u0411\u043e\u043b\u044c\u0448\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438<\/a>.<\/p>\n<h2>\u0412\u044b\u0432\u043e\u0434<\/h2>\n<p>\u0412\u043e\u0432\u0441\u0435 \u043d\u0435 \u043c\u043e\u0433\u0443 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u0447\u0442\u043e-\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u043b\u0443\u0447\u0448\u0435\u0435 \u0447\u0435\u043c \u0442\u043e, \u0447\u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442. \u041d\u043e \u043a\u0430\u043a \u043a\u043e\u043d\u0446\u0435\u043f\u0442 \u0447\u0435\u0433\u043e-\u0442\u043e \u0441\u0432\u0435\u0442\u043b\u043e\u0433\u043e \u043e\u0447\u0435\u043d\u044c \u0434\u0430\u0436\u0435. \u0412\u043e\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u043c\u043e\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0415\u0418, \u0442\u0430\u043a\u0443\u044e \u0443 F# \u0438 UnitsNet.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"\/img\/image-loader.svg\" height=\"588\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fee\/00a\/cce\/fee00acce965f93e4327e2f75a1fc36e.png\" data-width=\"665\"\/><figcaption><\/figcaption><\/figure>\n<p>Ext. \u044d\u0442\u043e \u043f\u0440\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u043e\u0441\u0442\u044c \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0432\u0435\u043b\u0438\u0447\u0438\u043d \u0438 \u0435\u0434\u0438\u043d\u0438\u0446 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f. \u0422\u0430\u0431\u043b\u0438\u0446\u0430 <a href=\"https:\/\/github.com\/WhiteBlackGoose\/UnitsOfMeasure\/blob\/main\/README.md#other-solutions\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<p><a href=\"https:\/\/github.com\/WhiteBlackGoose\/UnitsOfMeasure\" rel=\"noopener noreferrer nofollow\">\u0413\u0438\u0442\u0445\u0430\u0431<\/a> \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0438 <a href=\"https:\/\/github.com\/WhiteBlackGoose\" rel=\"noopener noreferrer nofollow\">\u043c\u043e\u0439 \u0433\u0438\u0442\u0445\u0430\u0431<\/a>. \u042d\u0442\u0430 \u0436\u0435 \u0441\u0442\u0430\u0442\u044c\u044f <a href=\"https:\/\/itnext.io\/stay-safe-with-your-units-advanced-units-of-measure-in-net-f7d8b02af87e\" rel=\"noopener noreferrer nofollow\">\u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c<\/a>.<\/p>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435. \u0417\u0430\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0439\u0442\u0435 \u0444\u0438\u0434\u0431\u0435\u043a!<\/p>\n<\/div>\n<\/div>\n<p> <!----> <\/p>\n<div class=\"tm-article-poll\">\n<div class=\"tm-notice tm-article-poll__notice tm-notice_positive\"><!----> <\/p>\n<div class=\"tm-notice__inner\"><!----> <\/p>\n<div class=\"tm-notice__content\"><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/post\/597437\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__header\">\u0415\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0435\u0434\u0438\u043d\u0438\u0446\u044b \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0432 .net, \u0442\u043e \u043a\u0430\u043a\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443?<\/div>\n<div class=\"tm-article-poll__answers\">\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">             11.11%           <\/span> <span class=\"tm-article-poll__answer-label\">UnitsNet<\/span> <span class=\"tm-article-poll__answer-votes\">             2           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width:11.11%;\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">             16.67%           <\/span> <span class=\"tm-article-poll__answer-label\">UoMs \u0432 F#<\/span> <span class=\"tm-article-poll__answer-votes\">             3           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width:16.67%;\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">             0%           <\/span> <span class=\"tm-article-poll__answer-label\">FSharp.UMX<\/span> <span class=\"tm-article-poll__answer-votes\">             0           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width:0%;\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">             50%           <\/span> <span class=\"tm-article-poll__answer-label\">\u0421\u0432\u043e\u044e<\/span> <span class=\"tm-article-poll__answer-votes\">             9           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress tm-article-poll__answer-progress_winning\" style=\"width:50%;\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">             22.22%           <\/span> <span class=\"tm-article-poll__answer-label\">\u0414\u0440\u0443\u0433\u043e\u0435<\/span> <span class=\"tm-article-poll__answer-votes\">             4           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width:22.22%;\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__stats\">        \u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b\u0438 18 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.          \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0438\u0441\u044c 50 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.      <\/div>\n<\/div>\n<div class=\"tm-article-poll\">\n<div class=\"tm-notice tm-article-poll__notice tm-notice_positive\"><!----> <\/p>\n<div class=\"tm-notice__inner\"><!----> <\/p>\n<div class=\"tm-notice__content\"><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/post\/597437\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__header\">\u0425\u043e\u0442\u0435\u043b\u0438 \u0431\u044b \u0432\u0438\u0434\u0435\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0432 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u0432\u0438\u0434\u0435?<\/div>\n<div class=\"tm-article-poll__answers\">\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">             73.17%           <\/span> <span class=\"tm-article-poll__answer-label\">\u0414\u0430<\/span> <span class=\"tm-article-poll__answer-votes\">             30           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress tm-article-poll__answer-progress_winning\" style=\"width:73.17%;\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">             21.95%           <\/span> <span class=\"tm-article-poll__answer-label\">\u041d\u0435\u0442, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u0435\u0435 \u043f\u043b\u044e\u0441\u0430\u0445<\/span> <span class=\"tm-article-poll__answer-votes\">             9           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width:21.95%;\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">             4.88%           <\/span> <span class=\"tm-article-poll__answer-label\">\u041d\u0435\u0442 (\u043f\u043e \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435)<\/span> <span class=\"tm-article-poll__answer-votes\">             2           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width:4.88%;\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__stats\">        \u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b 41 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c.          \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0438\u0441\u044c 28 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.      <\/div>\n<\/div>\n<p> \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\/post\/597437\/\"> https:\/\/habr.com\/ru\/post\/597437\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\" class=\"article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442!<\/p>\n<p>\u0425\u043e\u0447\u0443 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u043a\u043e\u043d\u0446\u0435\u043f\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0435\u0434\u0438\u043d\u0438\u0446 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0441 \u043f\u043e\u043b\u043d\u043e\u0439 \u0442\u0438\u043f\u043e\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c\u044e, \u0445\u043e\u0440\u043e\u0448\u0435\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u043f\u043e\u043b\u043d\u043e\u0439 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u043e\u0441\u0442\u044c\u044e!<\/p>\n<p>\u0414\u043b\u044f \u043d\u0435\u0442\u0435\u0440\u043f\u0435\u043b\u0438\u0432\u044b\u0445: <a href=\"https:\/\/github.com\/WhiteBlackGoose\/UnitsOfMeasure\" rel=\"noopener noreferrer nofollow\">github<\/a>.<\/p>\n<figure class=\"full-width\"><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b<\/figcaption><\/figure>\n<p>\u0415\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0434\u043b\u044f <abbr title=\"\u0415\u0434\u0438\u043d\u0438\u0446(\u044b)(\u0430) \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f\">\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f&#187;>\u0415<\/abbr>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/github.com\/angularsen\/UnitsNet\" rel=\"noopener noreferrer nofollow\">UnitsNet<\/a> \u0438 <a href=\"https:\/\/docs.microsoft.com\/en-us\/dotnet\/fsharp\/language-reference\/units-of-measure\" rel=\"noopener noreferrer nofollow\">Units of Measure in F#<\/a>. \u041e\u0431\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u0441\u0432\u043e\u044e \u0440\u0430\u0431\u043e\u0442\u0443. \u041d\u043e \u043c\u044b \u0437\u0434\u0435\u0441\u044c \u0431\u0443\u0434\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443. \u0410 \u0435\u0449\u0435 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044e \u0415\u0418.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u043f\u043e\u0433\u043d\u0430\u043b\u0438.<\/p>\n<h2>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h2>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u044b \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0434\u0435\u043b\u0438\u043c \u0415\u0418 \u043d\u0430 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u044b. \u0423 \u043d\u0430\u0441 \u043d\u0435\u0442 \u0434\u043b\u0438\u043d, \u0434\u0438\u0441\u0442\u0430\u043d\u0446\u0438\u0439, \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043c\u0430\u0441\u0441\u044b, \u043f\u043b\u043e\u0449\u0430\u0434\u0438, \u0438 \u0442. \u0434. \u041d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0443 \u043a\u0430\u0436\u0434\u043e\u0439 \u0415\u0418 \u0435\u0441\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u0430\u044f \u0415\u0418 \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>\u0423 \u0415\u0418 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u044e\u0431\u0430\u044f \u0431\u0430\u0437\u043e\u0432\u0430\u044f \u0415\u0418. \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u044f \u0431\u0443\u0434\u0443 \u0431\u0440\u0430\u0442\u044c \u0421\u0418 \u043a\u0430\u043a \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0415\u0418. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u043a\u0438\u043b\u043e\u043c\u0435\u0442\u0440\u0430 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0415\u0418 \u0431\u0443\u0434\u0435\u0442 \u043c\u0435\u0442\u0440 (1000 \u043c\u0435\u0442\u0440\u043e\u0432 \u0432 \u043a\u0438\u043b\u043e\u043c\u0435\u0442\u0440\u0435). \u0414\u043b\u044f \u0433\u0440\u0430\u043c\u043c\u0430 &#8212; \u043a\u0438\u043b\u043e\u0433\u0440\u0430\u043c\u043c (0.001 \u043a\u0433 \u0432 \u0433). \u0414\u043b\u044f \u043c\u0435\u0442\u0440\u0430 \u0431\u0430\u0437\u043e\u0432\u0430\u044f \u0415\u0418 &#8212; \u0442\u043e\u0436\u0435 \u043c\u0435\u0442\u0440 (1:1).<\/p>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0415\u0418:<\/p>\n<pre><code class=\"cs\">public interface IBaseUnit&lt;T, TNumber> {     TNumber Base { get; }     string Postfix { get; } }<\/code><\/pre>\n<p>Base &#8212; \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0415\u0418 \u0432 \u043d\u0430\u0448\u0435\u0439. Postfix &#8212; \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0430 \u043c\u0438\u043d\u0443\u0442\u0430:<\/p>\n<pre><code class=\"cs\">public struct Minute&lt;TNumber> : IBaseUnit&lt;Second&lt;TNumber>, TNumber> where TNumber : IMultiplicativeIdentity&lt;TNumber, TNumber>, IParseable&lt;TNumber> {     public string Postfix => \"min\";     public TNumber Base => Constants&lt;TNumber>.Number60; }<\/code><\/pre>\n<p>TNumber \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/preview-features-in-net-6-generic-math\/\" rel=\"noopener noreferrer nofollow\">generic math<\/a>.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u0447\u0442\u043e \u043d\u0430\u0441\u0447\u0435\u0442 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439? \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0434\u043b\u044f \u043d\u0438\u0445 \u0442\u043e\u0436\u0435 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0438 \u0435\u0434\u0438\u043d\u0438\u0446\u044b \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u043e\u0442 \u0442\u0430\u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e <a href=\"https:\/\/github.com\/WhiteBlackGoose\/UnitsOfMeasure\/blob\/296c8e3846de47dd5b695df120ca76da9e73942f\/Sources\/UnitsOfMeasure\/PredefinedUnits.Arithmetics.cs#L14\" rel=\"noopener noreferrer nofollow\">\u0434\u0435\u043b\u0435\u043d\u0438\u0435<\/a>:<\/p>\n<pre><code class=\"cs\">public struct Div&lt;T1, T2, T1Base, T2Base, TNumber>     : IBaseUnit&lt;Div&lt;T1Base, T2Base, T1Base, T2Base, TNumber>, TNumber>     where T1Base : struct, IBaseUnit&lt;T1Base, TNumber>     where T2Base : struct, IBaseUnit&lt;T2Base, TNumber>     where T1 : struct, IBaseUnit&lt;T1Base, TNumber>     where T2 : struct, IBaseUnit&lt;T2Base, TNumber>     where TNumber : IDivisionOperators&lt;TNumber, TNumber, TNumber> {     public TNumber Base => new T1().Base \/ new T2().Base;     public string Postfix => $\"({new T1().Postfix}\/{new T2().Postfix})\"; }<\/code><\/pre>\n<p>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0436\u0438\u0440\u043d\u043e\u0432\u0430\u0442\u043e\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435, \u043d\u043e \u043d\u0435 \u0432 \u0442\u043e\u043c \u0441\u0443\u0442\u044c. <code>Div<\/code> \u0442\u0430\u043a \u0436\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 <code>IBaseUnit<\/code> \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043f\u0440\u0438\u0447\u0435\u043c \u0431\u0430\u0437\u043e\u0432\u0430\u044f \u0415\u0418 \u0434\u043b\u044f \u043d\u0435\u0433\u043e &#8212; \u044d\u0442\u043e \u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u0415\u0418 \u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044f \u0438 \u0437\u043d\u0430\u043c\u0435\u043d\u0430\u0442\u0435\u043b\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0415\u0418 <code>\u043a\u043c\/\u043c\u0438\u043d<\/code> \u0431\u0430\u0437\u043e\u0432\u0430\u044f \u0415\u0418 &#8212; <code>\u043c\/\u0441<\/code>.<\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0442\u0430\u043a\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0441\u0430\u043c\u0438\u0445 \u0435\u0434\u0438\u043d\u0438\u0446 \u0438 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0432\u0435\u043b\u0438\u0447\u0438\u043d, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043b\u0435\u0433\u043a\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e \u0432 \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e \u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438, \u0447\u0442\u043e \u0431\u0430\u0437\u043e\u0432\u0430\u044f \u0415\u0418 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442:<\/p>\n<figure class=\"full-width\"><figcaption>\u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044f \u0435\u0434\u0438\u043d\u0438\u0446 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0441 \u043e\u0431\u0449\u0435\u0439 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0415\u0418<\/figcaption><\/figure>\n<p>\u0422. \u0435. \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u043c \u043e\u0434\u043d\u0443 \u0438 \u0442\u0443 \u0436\u0435 \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u0415\u0418, \u0438 \u043e\u0442\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u044f\u0441\u044c \u043e\u0442 \u043d\u0435\u0435 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u043b\u044e\u0431\u0443\u044e \u0432 \u043b\u044e\u0431\u0443\u044e. \u0410 \u0435\u0441\u043b\u0438 \u0431\u0430\u0437\u043e\u0432\u0430\u044f \u0415\u0418 \u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442, \u0437\u043d\u0430\u0447\u0438\u0442 \u043d\u0435\u043b\u044c\u0437\u044f \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c!<\/p>\n<figure class=\"full-width\"><figcaption>\u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044f \u0438\u0437 \u043c\u0435\u0442\u0440\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u044b \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430<\/figcaption><\/figure>\n<p>\u041f\u043e\u0434\u043e\u0431\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c, \u0442\u0440\u0435\u0431\u0443\u044f \u043e\u0434\u043d\u0443 \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u0415\u0418, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/github.com\/WhiteBlackGoose\/UnitsOfMeasure\/blob\/296c8e3846de47dd5b695df120ca76da9e73942f\/Sources\/UnitsOfMeasure\/Operations.cs#L19\" rel=\"noopener noreferrer nofollow\">\u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/a>. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 + \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u0442\u0430\u043a \u043a\u0430\u043a \u0443 \u043d\u0430\u0441 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c generic \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u0435\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f (extension method):<\/p>\n<pre><code class=\"cs\">[MethodImpl(MethodImplOptions.AggressiveInlining)] public static Unit&lt;T1, TBase, TNumber>      Add&lt;T1, T2, TBase, TNumber>(this Unit&lt;T1, TBase, TNumber> a, Unit&lt;T2, TBase, TNumber> b)     where T1 : IBaseUnit&lt;TBase, TNumber>     where T2 : IBaseUnit&lt;TBase, TNumber>     \/\/ \u0443\u0431\u0440\u0430\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e constraint-\u043e\u0432 \u0434\u043b\u044f \u043e\u0431\u043b\u0435\u0433\u0447\u0435\u043d\u0438\u044f \u0447\u0442\u0435\u043d\u0438\u044f     =>          typeof(T1) == typeof(T2)         ? new(a.Float + b.Float)         : new((a.Float * new T1().Base + b.Float * new T2().Base) \/ new T1().Base);<\/code><\/pre>\n<p>\u0422\u0430\u043a\u043e\u0439 \u043c\u0435\u0442\u043e\u0434 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u043c\u0435\u0442\u043e\u0434\u044b \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0415\u0418 \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0441\u0430\u043c\u0438 \u0415\u0418 \u0440\u0430\u0437\u043d\u044b\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, 20 \u0441\u0435\u043a\u0443\u043d\u0434 + 1 \u043c\u0438\u043d\u0443\u0442\u0430 = 80 \u0441\u0435\u043a\u0443\u043d\u0434. 1 \u043a\u043c + 1 \u043c\u0438\u043b\u044f = 2.6 \u043a\u043c. \u041d\u043e \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u0441\u043b\u043e\u0436\u0438\u0442\u044c \u0441\u0435\u043a\u0443\u043d\u0434\u044b \u0438 \u043c\u0435\u0442\u0440\u044b \u043d\u0435 \u0443\u0434\u0430\u0441\u0442\u0441\u044f (\u043d\u0435 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f).<\/p>\n<p>\u041f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b.<\/p>\n<h2>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0440\u0430\u0431\u043e\u0442\u044b<\/h2>\n<p>\u0412\u0441\u0435 \u043f\u043e\u0434\u0440\u044f\u0434:<\/p>\n<figure class=\"full-width\"><figcaption>\u0411\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b<\/figcaption><\/figure>\n<p>\u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 C#, \u0432 F# \u0435\u0441\u0442\u044c generic \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b, \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u0438\u0445 \u043d\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c?<\/p>\n<figure class=\"full-width\"><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432 F#<\/figcaption><\/figure>\n<p>\u041a\u0430\u043a \u043c\u044b \u043f\u043e\u043c\u043d\u0438\u043c, \u0432\u0441\u0435 \u0434\u0435\u043b\u0430\u043b\u043e\u0441\u044c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 generic math. \u0422\u043e \u0435\u0441\u0442\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0442\u0438\u043f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u0437\u044f\u0442\u044c <a href=\"https:\/\/www.nuget.org\/packages\/AngouriMath.Experimental\" rel=\"noopener noreferrer nofollow\">AngouriMath.Experimental<\/a>, \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f <a href=\"https:\/\/github.com\/asc-community\/AngouriMath\" rel=\"noopener noreferrer nofollow\">AngouriMath<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b generic math.<\/p>\n<figure class=\"full-width\"><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e\u0439 \u0430\u043b\u0433\u0435\u0431\u0440\u044b \u0441 \u043d\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0415\u0418<\/figcaption><\/figure>\n<h2>\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c<\/h2>\n<p>\u041d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043f\u043b\u043e\u0445\u043e. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043e\u0432\u0435\u0440\u0445\u0435\u0434 \u043d\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e JIT \u043d\u0435 \u043f\u0440\u043e\u043c\u043e\u0443\u0442\u0438\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0441 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u043f\u043e\u043b\u0435\u043c \u043f\u043e\u043a\u0430 \u0447\u0442\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0441\u043b\u0438 \u0441 float-\u0430\u043c\u0438 \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0438\u0437 \u0447\u0435\u0440\u0435\u0437 xmm \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b, \u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u044e\u043d\u0438\u0442\u0430 \u0432 \u043f\u0430\u043c\u044f\u0442\u044c, \u043f\u043e\u0442\u043e\u043c \u0432\u044b\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043d\u0430 xmm, \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e, \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0441 \u043e\u0431\u0435\u0440\u0442\u043e\u0447\u043d\u044b\u043c \u0442\u0438\u043f\u043e\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0434\u0430 \u0438 \u043f\u043e\u0442\u0435\u0440\u044f\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f &#8212; \u044d\u0442\u043e \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0434\u043e\u043b\u0435\u0439 \u043d\u0430\u043d\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u044b \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438. <a href=\"https:\/\/github.com\/WhiteBlackGoose\/UnitsOfMeasure#efficiency\" rel=\"noopener noreferrer nofollow\">\u0411\u043e\u043b\u044c\u0448\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438<\/a>.<\/p>\n<h2>\u0412\u044b\u0432\u043e\u0434<\/h2>\n<p>\u0412\u043e\u0432\u0441\u0435 \u043d\u0435 \u043c\u043e\u0433\u0443 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u0447\u0442\u043e-\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u043b\u0443\u0447\u0448\u0435\u0435 \u0447\u0435\u043c \u0442\u043e, \u0447\u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442. \u041d\u043e \u043a\u0430\u043a \u043a\u043e\u043d\u0446\u0435\u043f\u0442 \u0447\u0435\u0433\u043e-\u0442\u043e \u0441\u0432\u0435\u0442\u043b\u043e\u0433\u043e \u043e\u0447\u0435\u043d\u044c \u0434\u0430\u0436\u0435. \u0412\u043e\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u043c\u043e\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0415\u0418, \u0442\u0430\u043a\u0443\u044e \u0443 F# \u0438 UnitsNet.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>Ext. \u044d\u0442\u043e \u043f\u0440\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u043e\u0441\u0442\u044c \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0432\u0435\u043b\u0438\u0447\u0438\u043d \u0438 \u0435\u0434\u0438\u043d\u0438\u0446 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f. \u0422\u0430\u0431\u043b\u0438\u0446\u0430 <a href=\"https:\/\/github.com\/WhiteBlackGoose\/UnitsOfMeasure\/blob\/main\/README.md#other-solutions\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<p><a href=\"https:\/\/github.com\/WhiteBlackGoose\/UnitsOfMeasure\" rel=\"noopener noreferrer nofollow\">\u0413\u0438\u0442\u0445\u0430\u0431<\/a> \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0438 <a href=\"https:\/\/github.com\/WhiteBlackGoose\" rel=\"noopener noreferrer nofollow\">\u043c\u043e\u0439 \u0433\u0438\u0442\u0445\u0430\u0431<\/a>. \u042d\u0442\u0430 \u0436\u0435 \u0441\u0442\u0430\u0442\u044c\u044f <a href=\"https:\/\/itnext.io\/stay-safe-with-your-units-advanced-units-of-measure-in-net-f7d8b02af87e\" rel=\"noopener noreferrer nofollow\">\u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c<\/a>.<\/p>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435. \u0417\u0430\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0439\u0442\u0435 \u0444\u0438\u0434\u0431\u0435\u043a!<\/p>\n<\/div>\n<\/div>\n<p> <!----> <\/p>\n<div class=\"tm-article-poll\">\n<div class=\"tm-notice tm-article-poll__notice tm-notice_positive\"><!----> <\/p>\n<div class=\"tm-notice__inner\"><!----> <\/p>\n<div class=\"tm-notice__content\"><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/post\/597437\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__header\">\u0415\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0435\u0434\u0438\u043d\u0438\u0446\u044b \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0432 .net, \u0442\u043e \u043a\u0430\u043a\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443?<\/div>\n<div class=\"tm-article-poll__answers\">\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">             11.11%           <\/span> <span class=\"tm-article-poll__answer-label\">UnitsNet<\/span> <span class=\"tm-article-poll__answer-votes\">             2           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width:11.11%;\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">             16.67%           <\/span> <span class=\"tm-article-poll__answer-label\">UoMs \u0432 F#<\/span> <span class=\"tm-article-poll__answer-votes\">             3           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width:16.67%;\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">             0%           <\/span> <span class=\"tm-article-poll__answer-label\">FSharp.UMX<\/span> <span class=\"tm-article-poll__answer-votes\">             0           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width:0%;\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">             50%           <\/span> <span class=\"tm-article-poll__answer-label\">\u0421\u0432\u043e\u044e<\/span> <span class=\"tm-article-poll__answer-votes\">             9           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress tm-article-poll__answer-progress_winning\" style=\"width:50%;\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">             22.22%           <\/span> <span class=\"tm-article-poll__answer-label\">\u0414\u0440\u0443\u0433\u043e\u0435<\/span> <span class=\"tm-article-poll__answer-votes\">             4           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width:22.22%;\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__stats\">        \u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b\u0438 18 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.          \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0438\u0441\u044c 50 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.      <\/div>\n<\/div>\n<div class=\"tm-article-poll\">\n<div class=\"tm-notice tm-article-poll__notice tm-notice_positive\"><!----> <\/p>\n<div class=\"tm-notice__inner\"><!----> <\/p>\n<div class=\"tm-notice__content\"><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/post\/597437\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__header\">\u0425\u043e\u0442\u0435\u043b\u0438 \u0431\u044b \u0432\u0438\u0434\u0435\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0432 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u0432\u0438\u0434\u0435?<\/div>\n<div class=\"tm-article-poll__answers\">\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">             73.17%           <\/span> <span class=\"tm-article-poll__answer-label\">\u0414\u0430<\/span> <span class=\"tm-article-poll__answer-votes\">             30           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress tm-article-poll__answer-progress_winning\" style=\"width:73.17%;\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">             21.95%           <\/span> <span class=\"tm-article-poll__answer-label\">\u041d\u0435\u0442, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u0435\u0435 \u043f\u043b\u044e\u0441\u0430\u0445<\/span> <span class=\"tm-article-poll__answer-votes\">             9           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width:21.95%;\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">             4.88%           <\/span> <span class=\"tm-article-poll__answer-label\">\u041d\u0435\u0442 (\u043f\u043e \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435)<\/span> <span class=\"tm-article-poll__answer-votes\">             2           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width:4.88%;\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__stats\">        \u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b 41 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c.          \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0438\u0441\u044c 28 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.      <\/div>\n<\/div>\n<p> \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\/post\/597437\/\"> https:\/\/habr.com\/ru\/post\/597437\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-327527","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/327527","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=327527"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/327527\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=327527"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=327527"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=327527"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}