{"id":387098,"date":"2024-06-29T07:07:31","date_gmt":"2024-06-29T07:07:31","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=387098"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=387098","title":{"rendered":"<span>AngouriMath 1.3 update<\/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<h2>What is it about?<\/h2>\n<p>AngouriMath is a free open-source symbolic algebra library, written in and for .NET, that I&#8217;ve been working since the end of 2019. The previous major release happened on the second of March, I <a href=\"https:\/\/habr.com\/en\/post\/545436\/\" rel=\"noopener noreferrer nofollow\">made an article<\/a> about it too.<\/p>\n<p>Now, let me tell what we, together with contributors, did within these four months!<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/169\/36b\/3fc\/16936b3fcab2e2c445e0aa79261c96dd.png\" width=\"1899\" height=\"1026\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/169\/36b\/3fc\/16936b3fcab2e2c445e0aa79261c96dd.png\"\/><figcaption><\/figcaption><\/figure>\n<p>AngouriMath is made for C#, F#, Interactive, and to an extent, C++, so let me draw a distinction, what package affects what environment:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"201\" width=\"201\">\n<p align=\"center\">\n<\/td>\n<td>\n<p>C#<\/p>\n<\/td>\n<td>\n<p>F#<\/p>\n<\/td>\n<td>\n<p>Interactive<\/p>\n<\/td>\n<td>\n<p>C++<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"201\" width=\"201\">\n<p>AngouriMath<\/p>\n<\/td>\n<td>\n<p align=\"center\">\u2713  <\/p>\n<\/td>\n<td>\n<p align=\"center\">\u2713<\/p>\n<\/td>\n<td>\n<p align=\"center\">\u2713<\/p>\n<\/td>\n<td>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"201\" width=\"201\">\n<p>AngouriMath.FSharp<\/p>\n<\/td>\n<td>\n<\/td>\n<td>\n<p align=\"center\">\u2713<\/p>\n<\/td>\n<td>\n<p align=\"center\">\u2713<\/p>\n<\/td>\n<td>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"201\" width=\"201\">\n<p>AngouriMath.Interactive<\/p>\n<\/td>\n<td>\n<\/td>\n<td>\n<\/td>\n<td>\n<p align=\"center\">\u2713<\/p>\n<\/td>\n<td>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"201\" width=\"201\">\n<p>AngouriMath.CPP<\/p>\n<\/td>\n<td>\n<\/td>\n<td>\n<\/td>\n<td>\n<\/td>\n<td>\n<p align=\"center\">\u2713<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h2>Matrices<\/h2>\n<p>This is the main change in terms of breaking API and behaviour. Now, instead of tensor, there&#8217;s matrix, which is <code>Entity.Matrix<\/code>. There is also vector, but it doesn&#8217;t have its own type. Instead, it&#8217;s a single-column matrix. So for matrices there&#8217;s only one type.<\/p>\n<p>The syntax for parsing is<\/p>\n<pre><code class=\"cs\">Entity a = \"[1, 2, 3]\";<\/code><\/pre>\n<p>it becomes a vector of three elements.<\/p>\n<pre><code class=\"cs\">Entity a = \"[1, 2, 3]T\"<\/code><\/pre>\n<p>becomes a transposed vector, that is, instead of column vector, it&#8217;s a row vector. Here&#8217;s how we create a 2&#215;2 matrix:<\/p>\n<pre><code class=\"cs\">Entity a = \"[[1, 2], [3, 4]]\"<\/code><\/pre>\n<p>[1, 2] is a row.<\/p>\n<p>The properties and functions of matrix:<\/p>\n<pre><code class=\"cs\">Entity.Matrix m = ... m.Adjugate   \/\/ null if it doesn't exist m.AsScalar() \/\/ casts a 1x1 to scalar m.Inverse    \/\/ null if it doesn't exist m.Pow(int)   \/\/ finds a matrix power or throws m.ReducedRowEchelonForm<\/code><\/pre>\n<p>See more at the <a href=\"https:\/\/am.angouri.org\/docs\/AngouriMath.Entity\/Matrix.html\" rel=\"noopener noreferrer nofollow\">docs<\/a>.<\/p>\n<p>There are also improvements in AngouriMath.FSharp&#8217;s matrices. All matrix-related functions moved to <code>AngouriMath.FSharp.Matrices<\/code>. Now there is a number of operators for matrices specifically all of which end with dot. For example,<\/p>\n<pre><code>a +. b a -. b a *. b a \/. b a **. b \/\/ matrix power a ***. b \/\/ tensor product a ****. b \/\/ tensor power<\/code><\/pre>\n<h2>Parser and LaTeX<\/h2>\n<p>The parser now supports Cyrillic and Greek letters, as well as it skips \\n and \\r letters, which might be helpful for building matrices.<\/p>\n<p>There&#8217;s also now a setting <code>MathS.Settings.ExplicitParsingOnly<\/code>, which, when set to true, does not insert omitted operators, so while<\/p>\n<pre><code class=\"cs\">Entity a = \"2x + 3(x + 1)\";<\/code><\/pre>\n<p>is fine when the setting is disabled, it won&#8217;t be considered valid with the setting enabled.<\/p>\n<p>There is also <code>MathS.Parse<\/code> which returns an <code>Either<\/code> of <code>Entity<\/code> and reason why parsing failed. <code>Either<\/code> is an anonymous type union from <a href=\"https:\/\/github.com\/WhiteBlackGoose\/HonkSharp\" rel=\"noopener noreferrer nofollow\">Honk#<\/a>, which I&#8217;ll mention later. Example of code using it:<\/p>\n<pre><code class=\"cs\">using AngouriMath; using System;  var res = MathS.Parse(\"2x + 3\")     .Switch(         valid => valid,         failure => failure.Reason.Switch&lt;Entity>(                 unknown => $\"Unknown reason: {unknown.Reason}\",                 missingOperator => $\"Operator missed: {missingOperator.Details}\",                 internalError => $\"Internal error: {internalError.Details}\"         )     );  Console.WriteLine(res);<\/code><\/pre>\n<p>Latexise now doesn&#8217;t produce unneeded \\times, and instead, \\dot-s are only produced when needed (e. g. between variables). A few bugs in it fixed.<\/p>\n<h2>New Functions<\/h2>\n<p><code>MathS.Series.Maclaurin<\/code>, <code>MathS.Series.Taylor<\/code> , <code>MathS.Series.TaylorTerms<\/code> are functions to generate Taylor expansion expressions. <\/p>\n<p>A lot of experimental API added for number theory. The final function is the symbolic form of sine and cosine based on existing analytical angles, for example, here&#8217;s the precise value of sin(17\/42 pi):<\/p>\n<pre><code>1\/2 * ((sqrt(1 - sqrt(1\/2 - 1\/2 * sqrt(1 - sqrt(1 - (1\/6 * (-1 + ((7 + 21 * sqrt(-3)) \/ 2) ^ (1\/3) + ((7 - 21 * sqrt(-3)) \/ 2) ^ (1\/3))) ^ 2) ^ 2)) ^ 2) ^ 2 - sqrt(1\/2 - 1\/2 * sqrt(1 - sqrt(1 - (1\/6 * (-1 + ((7 + 21 * sqrt(-3)) \/ 2) ^ (1\/3) + ((7 - 21 * sqrt(-3)) \/ 2) ^ (1\/3))) ^ 2) ^ 2)) ^ 2) * sqrt(1 - sqrt(1\/2 - 1\/2 * sqrt(1 - sqrt(1 - (1\/6 * (-1 + ((7 + 21 * sqrt(-3)) \/ 2) ^ (1\/3) + ((7 - 21 * sqrt(-3)) \/ 2) ^ (1\/3))) ^ 2) ^ 2)) ^ 2) - 2 * sqrt(1\/2 - 1\/2 * sqrt(1 - sqrt(1 - (1\/6 * (-1 + ((7 + 21 * sqrt(-3)) \/ 2) ^ (1\/3) + ((7 - 21 * sqrt(-3)) \/ 2) ^ (1\/3))) ^ 2) ^ 2)) * sqrt(1 - sqrt(1\/2 - 1\/2 * sqrt(1 - sqrt(1 - (1\/6 * (-1 + ((7 + 21 * sqrt(-3)) \/ 2) ^ (1\/3) + ((7 - 21 * sqrt(-3)) \/ 2) ^ (1\/3))) ^ 2) ^ 2)) ^ 2) * sqrt(1\/2 - 1\/2 * sqrt(1 - sqrt(1 - (1\/6 * (-1 + ((7 + 21 * sqrt(-3)) \/ 2) ^ (1\/3) + ((7 - 21 * sqrt(-3)) \/ 2) ^ (1\/3))) ^ 2) ^ 2))) - -(2 * sqrt(1\/2 - 1\/2 * sqrt(1 - sqrt(1 - (1\/6 * (-1 + ((7 + 21 * sqrt(-3)) \/ 2) ^ (1\/3) + ((7 - 21 * sqrt(-3)) \/ 2) ^ (1\/3))) ^ 2) ^ 2)) * sqrt(1 - sqrt(1\/2 - 1\/2 * sqrt(1 - sqrt(1 - (1\/6 * (-1 + ((7 + 21 * sqrt(-3)) \/ 2) ^ (1\/3) + ((7 - 21 * sqrt(-3)) \/ 2) ^ (1\/3))) ^ 2) ^ 2)) ^ 2) * sqrt(1 - sqrt(1\/2 - 1\/2 * sqrt(1 - sqrt(1 - (1\/6 * (-1 + ((7 + 21 * sqrt(-3)) \/ 2) ^ (1\/3) + ((7 - 21 * sqrt(-3)) \/ 2) ^ (1\/3))) ^ 2) ^ 2)) ^ 2) + (sqrt(1 - sqrt(1\/2 - 1\/2 * sqrt(1 - sqrt(1 - (1\/6 * (-1 + ((7 + 21 * sqrt(-3)) \/ 2) ^ (1\/3) + ((7 - 21 * sqrt(-3)) \/ 2) ^ (1\/3))) ^ 2) ^ 2)) ^ 2) ^ 2 - sqrt(1\/2 - 1\/2 * sqrt(1 - sqrt(1 - (1\/6 * (-1 + ((7 + 21 * sqrt(-3)) \/ 2) ^ (1\/3) + ((7 - 21 * sqrt(-3)) \/ 2) ^ (1\/3))) ^ 2) ^ 2)) ^ 2) * sqrt(1\/2 - 1\/2 * sqrt(1 - sqrt(1 - (1\/6 * (-1 + ((7 + 21 * sqrt(-3)) \/ 2) ^ (1\/3) + ((7 - 21 * sqrt(-3)) \/ 2) ^ (1\/3))) ^ 2) ^ 2))) * sqrt(3) \/ 2<\/code><\/pre>\n<p>All added functions: <code>SymbolicFormOfSine<\/code>,\u00a0<code>SymbolicFormOfCosine<\/code>,\u00a0<code>ExpandSineOfSum<\/code>,\u00a0<code>ExpandConsineOfSum<\/code>,\u00a0<code>ExpandSineArgumentMultiplied<\/code>,\u00a0<code>ExpandCosineArgumentMultiplied<\/code>,\u00a0<code>GetSineOfHalvedAngle<\/code>,\u00a0<code>GetCosineOfHalvedAngle<\/code>,\u00a0<code>DecomposeRational<\/code>,\u00a0<code>GetSineOfHalvedAngle<\/code>  <\/p>\n<p>A few synonyms added for hyperbolic functions. All functions from AngouriMath.FSharp now get <code>InnerSimplified<\/code> applied (for instance, <code>sqrt 4<\/code> will return <code>2<\/code> while <code>MathS.Sqrt(4)<\/code> will still return a power node).<\/p>\n<p>AngouriMath.Interactive now has a AggressiveOperators module, which overrides the default operators, such as +, -, *, \/, **, &lt;, >, >=, &lt;=, =. It is not recommended to use it as a library, but might be useful for some small calculations, like I did it in the <a href=\"https:\/\/github.com\/WhiteBlackGoose\/AngouriMath.Terminal\" rel=\"noopener noreferrer nofollow\">terminal<\/a>.<\/p>\n<h2>AngouriMath.CPP: wrapper for C++<\/h2>\n<p>Now there&#8217;s a native version of the library that can be consumed from unmanaged code. It is possible thanks to <a href=\"https:\/\/github.com\/dotnet\/runtimelab\/tree\/feature\/NativeAOT\" rel=\"noopener noreferrer nofollow\">NativeAOT<\/a>, new feature which allows to compile managed .NET assemblies into native code. Here&#8217;s an example:<\/p>\n<pre><code class=\"cpp\">#include &lt;AngouriMath.h> AngouriMath::Entity expr(\"x * y + 2sin(x * y) - y^x\"); std::cout &lt;&lt; expr.Differentiate(\"x\") &lt;&lt; \"\\n\";<\/code><\/pre>\n<p>Output:<\/p>\n<pre><code class=\"cpp\">y + cos(x * y) * y * 2 - y ^ x * ln(y)<\/code><\/pre>\n<p>It is currently in the experimental phase. You can try it by installing it following a short <a href=\"https:\/\/am.angouri.org\/quickstart\/#cpp\" rel=\"noopener noreferrer nofollow\">instruction<\/a>. Very few functions are still exposed, so it can be barely used for now, but hope it will be developed further in the future.<\/p>\n<p>My <a href=\"https:\/\/www.reddit.com\/r\/dotnet\/comments\/nctry2\/nets_angourimath_now_can_be_used_from_c_proof_of\/\" rel=\"noopener noreferrer nofollow\">Reddit post <\/a>about it.<\/p>\n<h2>Using AngouriMath in your projects<\/h2>\n<p>Now, aside from netstandard2.0, it multitargets .NET Framework 4.7.2+ and netstandard2.1. The former allows to use the library in legacy projects more conveniently.<\/p>\n<p><a href=\"https:\/\/github.com\/WhiteBlackGoose\/HonkSharp\" rel=\"noopener noreferrer nofollow\">Honk#<\/a> now helps to maintain the project easier, but since it&#8217;s shipped with AngouriMath now, it might be a good idea to try its syntax in some cases.<\/p>\n<h2>Conclusion<\/h2>\n<p>There are a lot of minor features and fixes that are not very interesting to read about. Most of them and other updates are listed in the <a href=\"https:\/\/am.angouri.org\/whatsnew\/\" rel=\"noopener noreferrer nofollow\">what&#8217;s new page on the website<\/a>.<\/p>\n<p>Thank you for your attention! Feel free to ask questions.<\/p>\n<h2>References<\/h2>\n<ol>\n<li>\n<p><a href=\"https:\/\/github.com\/asc-community\/AngouriMath\" rel=\"noopener noreferrer nofollow\">Github<\/a> of the project<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/am.angouri.org\/\" rel=\"noopener noreferrer nofollow\">Website<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/am.angouri.org\/whatsnew\/\" rel=\"noopener noreferrer nofollow\">Release notes<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.nuget.org\/packages\/AngouriMath\" rel=\"noopener noreferrer nofollow\">Nuget<\/a> (<a href=\"https:\/\/www.nuget.org\/packages\/AngouriMath\" rel=\"noopener noreferrer nofollow\">C#<\/a>, <a href=\"https:\/\/www.nuget.org\/packages\/AngouriMath.FSharp\" rel=\"noopener noreferrer nofollow\">F#<\/a>, <a href=\"https:\/\/www.nuget.org\/packages\/AngouriMath.Interactive\" rel=\"noopener noreferrer nofollow\">Interactive<\/a>)<\/p>\n<\/li>\n<li>\n<p>Try in <a href=\"https:\/\/mybinder.org\/v2\/gh\/asc-community\/AngouriMathLab\/try?filepath=HelloBook.AngouriMath.Interactive.ipynb\" rel=\"noopener noreferrer nofollow\">binder<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/dotnet\/runtimelab\/tree\/feature\/NativeAOT\" rel=\"noopener noreferrer nofollow\">NativeAOT<\/a> for native compilation<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/dotnet\/interactive\" rel=\"noopener noreferrer nofollow\">dotnet\/interactive<\/a> for Jupyter and notebooks<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/WhiteBlackGoose\/HonkSharp\" rel=\"noopener noreferrer nofollow\">Honk#<\/a> for convenient coding<\/p>\n<\/li>\n<li>\n<p>My <a href=\"https:\/\/twitter.com\/WhiteBlackGoose\" rel=\"noopener noreferrer nofollow\">twitter<\/a><\/p>\n<\/li>\n<\/ol>\n<h2>Thanks<\/h2>\n<p>Aside from myself, I want to thank these people for helping with the project:<\/p>\n<p><strong>Contributors<\/strong>: <a href=\"https:\/\/github.com\/Happypig375\" rel=\"noopener noreferrer nofollow\">Happypig375<\/a>, <a href=\"https:\/\/github.com\/ryyanmapes\" rel=\"noopener noreferrer nofollow\">ryynmapes<\/a>, <a href=\"https:\/\/github.com\/MomoDeve\" rel=\"noopener noreferrer nofollow\">MomoDeve<\/a>, <a href=\"https:\/\/github.com\/TheSeems\" rel=\"noopener noreferrer nofollow\">TheSeems<\/a>, <a href=\"https:\/\/github.com\/KuhakuPixel\" rel=\"noopener noreferrer nofollow\">KuhakuPixel<\/a>, <a href=\"https:\/\/github.com\/jaimeadf\" rel=\"noopener noreferrer nofollow\">jaimeadf<\/a>, <a href=\"https:\/\/github.com\/yoshiask\" rel=\"noopener noreferrer nofollow\">yoshiask<\/a>.<\/p>\n<p><strong>Consultants<\/strong>: <a href=\"https:\/\/github.com\/Happypig375\" rel=\"noopener noreferrer nofollow\">Happypig375<\/a>, mednik.<\/p>\n<p><strong>Sponsors<\/strong>: zyzhu.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/565996\/\"> https:\/\/habr.com\/ru\/articles\/565996\/<\/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<h2>What is it about?<\/h2>\n<p>AngouriMath is a free open-source symbolic algebra library, written in and for .NET, that I&#8217;ve been working since the end of 2019. The previous major release happened on the second of March, I <a href=\"https:\/\/habr.com\/en\/post\/545436\/\" rel=\"noopener noreferrer nofollow\">made an article<\/a> about it too.<\/p>\n<p>Now, let me tell what we, together with contributors, did within these four months!<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>AngouriMath is made for C#, F#, Interactive, and to an extent, C++, so let me draw a distinction, what package affects what environment:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"201\" width=\"201\">\n<p align=\"center\">\n<\/td>\n<td>\n<p>C#<\/p>\n<\/td>\n<td>\n<p>F#<\/p>\n<\/td>\n<td>\n<p>Interactive<\/p>\n<\/td>\n<td>\n<p>C++<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"201\" width=\"201\">\n<p>AngouriMath<\/p>\n<\/td>\n<td>\n<p align=\"center\">\u2713  <\/p>\n<\/td>\n<td>\n<p align=\"center\">\u2713<\/p>\n<\/td>\n<td>\n<p align=\"center\">\u2713<\/p>\n<\/td>\n<td>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"201\" width=\"201\">\n<p>AngouriMath.FSharp<\/p>\n<\/td>\n<td>\n<\/td>\n<td>\n<p align=\"center\">\u2713<\/p>\n<\/td>\n<td>\n<p align=\"center\">\u2713<\/p>\n<\/td>\n<td>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"201\" width=\"201\">\n<p>AngouriMath.Interactive<\/p>\n<\/td>\n<td>\n<\/td>\n<td>\n<\/td>\n<td>\n<p align=\"center\">\u2713<\/p>\n<\/td>\n<td>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"201\" width=\"201\">\n<p>AngouriMath.CPP<\/p>\n<\/td>\n<td>\n<\/td>\n<td>\n<\/td>\n<td>\n<\/td>\n<td>\n<p align=\"center\">\u2713<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h2>Matrices<\/h2>\n<p>This is the main change in terms of breaking API and behaviour. Now, instead of tensor, there&#8217;s matrix, which is <code>Entity.Matrix<\/code>. There is also vector, but it doesn&#8217;t have its own type. Instead, it&#8217;s a single-column matrix. So for matrices there&#8217;s only one type.<\/p>\n<p>The syntax for parsing is<\/p>\n<pre><code class=\"cs\">Entity a = \"[1, 2, 3]\";<\/code><\/pre>\n<p>it becomes a vector of three elements.<\/p>\n<pre><code class=\"cs\">Entity a = \"[1, 2, 3]T\"<\/code><\/pre>\n<p>becomes a transposed vector, that is, instead of column vector, it&#8217;s a row vector. Here&#8217;s how we create a 2&#215;2 matrix:<\/p>\n<pre><code class=\"cs\">Entity a = \"[[1, 2], [3, 4]]\"<\/code><\/pre>\n<p>[1, 2] is a row.<\/p>\n<p>The properties and functions of matrix:<\/p>\n<pre><code class=\"cs\">Entity.Matrix m = ... m.Adjugate   \/\/ null if it doesn't exist m.AsScalar() \/\/ casts a 1x1 to scalar m.Inverse    \/\/ null if it doesn't exist m.Pow(int)   \/\/ finds a matrix power or throws m.ReducedRowEchelonForm<\/code><\/pre>\n<p>See more at the <a href=\"https:\/\/am.angouri.org\/docs\/AngouriMath.Entity\/Matrix.html\" rel=\"noopener noreferrer nofollow\">docs<\/a>.<\/p>\n<p>There are also improvements in AngouriMath.FSharp&#8217;s matrices. All matrix-related functions moved to <code>AngouriMath.FSharp.Matrices<\/code>. Now there is a number of operators for matrices specifically all of which end with dot. For example,<\/p>\n<pre><code>a +. b a -. b a *. b a \/. b a **. b \/\/ matrix power a ***. b \/\/ tensor product a ****. b \/\/ tensor power<\/code><\/pre>\n<h2>Parser and LaTeX<\/h2>\n<p>The parser now supports Cyrillic and Greek letters, as well as it skips \\n and \\r letters, which might be helpful for building matrices.<\/p>\n<p>There&#8217;s also now a setting <code>MathS.Settings.ExplicitParsingOnly<\/code>, which, when set to true, does not insert omitted operators, so while<\/p>\n<pre><code class=\"cs\">Entity a = \"2x + 3(x + 1)\";<\/code><\/pre>\n<p>is fine when the setting is disabled, it won&#8217;t be considered valid with the setting enabled.<\/p>\n<p>There is also <code>MathS.Parse<\/code> which returns an <code>Either<\/code> of <code>Entity<\/code> and reason why parsing failed. <code>Either<\/code> is an anonymous type union from <a href=\"https:\/\/github.com\/WhiteBlackGoose\/HonkSharp\" rel=\"noopener noreferrer nofollow\">Honk#<\/a>, which I&#8217;ll mention later. Example of code using it:<\/p>\n<pre><code class=\"cs\">using AngouriMath; using System;  var res = MathS.Parse(\"2x + 3\")     .Switch(         valid => valid,         failure => failure.Reason.Switch&lt;Entity>(                 unknown => $\"Unknown reason: {unknown.Reason}\",                 missingOperator => $\"Operator missed: {missingOperator.Details}\",                 internalError => $\"Internal error: {internalError.Details}\"         )     );  Console.WriteLine(res);<\/code><\/pre>\n<p>Latexise now doesn&#8217;t produce unneeded \\times, and instead, \\dot-s are only produced when needed (e. g. between variables). A few bugs in it fixed.<\/p>\n<h2>New Functions<\/h2>\n<p><code>MathS.Series.Maclaurin<\/code>, <code>MathS.Series.Taylor<\/code> , <code>MathS.Series.TaylorTerms<\/code> are functions to generate Taylor expansion expressions. <\/p>\n<p>A lot of experimental API added for number theory. The final function is the symbolic form of sine and cosine based on existing analytical angles, for example, here&#8217;s the precise value of sin(17\/42 pi):<\/p>\n<pre><code>1\/2 * ((sqrt(1 - sqrt(1\/2 - 1\/2 * sqrt(1 - sqrt(1 - (1\/6 * (-1 + ((7 + 21 * sqrt(-3)) \/ 2) ^ (1\/3) + ((7 - 21 * sqrt(-3)) \/ 2) ^ (1\/3))) ^ 2) ^ 2)) ^ 2) ^ 2 - sqrt(1\/2 - 1\/2 * sqrt(1 - sqrt(1 - (1\/6 * (-1 + ((7 + 21 * sqrt(-3)) \/ 2) ^ (1\/3) + ((7 - 21 * sqrt(-3)) \/ 2) ^ (1\/3))) ^ 2) ^ 2)) ^ 2) * sqrt(1 - sqrt(1\/2 - 1\/2 * sqrt(1 - sqrt(1 - (1\/6 * (-1 + ((7 + 21 * sqrt(-3)) \/ 2) ^ (1\/3) + ((7 - 21 * sqrt(-3)) \/ 2) ^ (1\/3))) ^ 2) ^ 2)) ^ 2) - 2 * sqrt(1\/2 - 1\/2 * sqrt(1 - sqrt(1 - (1\/6 * (-1 + ((7 + 21 * sqrt(-3)) \/ 2) ^ (1\/3) + ((7 - 21 * sqrt(-3)) \/ 2) ^ (1\/3))) ^ 2) ^ 2)) * sqrt(1 - sqrt(1\/2 - 1\/2 * sqrt(1 - sqrt(1 - (1\/6 * (-1 + ((7 + 21 * sqrt(-3)) \/ 2) ^ (1\/3) + ((7 - 21 * sqrt(-3)) \/ 2) ^ (1\/3))) ^ 2) ^ 2)) ^ 2) * sqrt(1\/2 - 1\/2 * sqrt(1 - sqrt(1 - (1\/6 * (-1 + ((7 + 21 * sqrt(-3)) \/ 2) ^ (1\/3) + ((7 - 21 * sqrt(-3)) \/ 2) ^ (1\/3))) ^ 2) ^ 2))) - -(2 * sqrt(1\/2 - 1\/2 * sqrt(1 - sqrt(1 - (1\/6 * (-1 + ((7 + 21 * sqrt(-3)) \/ 2) ^ (1\/3) + ((7 - 21 * sqrt(-3)) \/ 2) ^ (1\/3))) ^ 2) ^ 2)) * sqrt(1 - sqrt(1\/2 - 1\/2 * sqrt(1 - sqrt(1 - (1\/6 * (-1 + ((7 + 21 * sqrt(-3)) \/ 2) ^ (1\/3) + ((7 - 21 * sqrt(-3)) \/ 2) ^ (1\/3))) ^ 2) ^ 2)) ^ 2) * sqrt(1 - sqrt(1\/2 - 1\/2 * sqrt(1 - sqrt(1 - (1\/6 * (-1 + ((7 + 21 * sqrt(-3)) \/ 2) ^ (1\/3) + ((7 - 21 * sqrt(-3)) \/ 2) ^ (1\/3))) ^ 2) ^ 2)) ^ 2) + (sqrt(1 - sqrt(1\/2 - 1\/2 * sqrt(1 - sqrt(1 - (1\/6 * (-1 + ((7 + 21 * sqrt(-3)) \/ 2) ^ (1\/3) + ((7 - 21 * sqrt(-3)) \/ 2) ^ (1\/3))) ^ 2) ^ 2)) ^ 2) ^ 2 - sqrt(1\/2 - 1\/2 * sqrt(1 - sqrt(1 - (1\/6 * (-1 + ((7 + 21 * sqrt(-3)) \/ 2) ^ (1\/3) + ((7 - 21 * sqrt(-3)) \/ 2) ^ (1\/3))) ^ 2) ^ 2)) ^ 2) * sqrt(1\/2 - 1\/2 * sqrt(1 - sqrt(1 - (1\/6 * (-1 + ((7 + 21 * sqrt(-3)) \/ 2) ^ (1\/3) + ((7 - 21 * sqrt(-3)) \/ 2) ^ (1\/3))) ^ 2) ^ 2))) * sqrt(3) \/ 2<\/code><\/pre>\n<p>All added functions: <code>SymbolicFormOfSine<\/code>,\u00a0<code>SymbolicFormOfCosine<\/code>,\u00a0<code>ExpandSineOfSum<\/code>,\u00a0<code>ExpandConsineOfSum<\/code>,\u00a0<code>ExpandSineArgumentMultiplied<\/code>,\u00a0<code>ExpandCosineArgumentMultiplied<\/code>,\u00a0<code>GetSineOfHalvedAngle<\/code>,\u00a0<code>GetCosineOfHalvedAngle<\/code>,\u00a0<code>DecomposeRational<\/code>,\u00a0<code>GetSineOfHalvedAngle<\/code>  <\/p>\n<p>A few synonyms added for hyperbolic functions. All functions from AngouriMath.FSharp now get <code>InnerSimplified<\/code> applied (for instance, <code>sqrt 4<\/code> will return <code>2<\/code> while <code>MathS.Sqrt(4)<\/code> will still return a power node).<\/p>\n<p>AngouriMath.Interactive now has a AggressiveOperators module, which overrides the default operators, such as +, -, *, \/, **, &lt;, >, >=, &lt;=, =. It is not recommended to use it as a library, but might be useful for some small calculations, like I did it in the <a href=\"https:\/\/github.com\/WhiteBlackGoose\/AngouriMath.Terminal\" rel=\"noopener noreferrer nofollow\">terminal<\/a>.<\/p>\n<h2>AngouriMath.CPP: wrapper for C++<\/h2>\n<p>Now there&#8217;s a native version of the library that can be consumed from unmanaged code. It is possible thanks to <a href=\"https:\/\/github.com\/dotnet\/runtimelab\/tree\/feature\/NativeAOT\" rel=\"noopener noreferrer nofollow\">NativeAOT<\/a>, new feature which allows to compile managed .NET assemblies into native code. Here&#8217;s an example:<\/p>\n<pre><code class=\"cpp\">#include &lt;AngouriMath.h> AngouriMath::Entity expr(\"x * y + 2sin(x * y) - y^x\"); std::cout &lt;&lt; expr.Differentiate(\"x\") &lt;&lt; \"\\n\";<\/code><\/pre>\n<p>Output:<\/p>\n<pre><code class=\"cpp\">y + cos(x * y) * y * 2 - y ^ x * ln(y)<\/code><\/pre>\n<p>It is currently in the experimental phase. You can try it by installing it following a short <a href=\"https:\/\/am.angouri.org\/quickstart\/#cpp\" rel=\"noopener noreferrer nofollow\">instruction<\/a>. Very few functions are still exposed, so it can be barely used for now, but hope it will be developed further in the future.<\/p>\n<p>My <a href=\"https:\/\/www.reddit.com\/r\/dotnet\/comments\/nctry2\/nets_angourimath_now_can_be_used_from_c_proof_of\/\" rel=\"noopener noreferrer nofollow\">Reddit post <\/a>about it.<\/p>\n<h2>Using AngouriMath in your projects<\/h2>\n<p>Now, aside from netstandard2.0, it multitargets .NET Framework 4.7.2+ and netstandard2.1. The former allows to use the library in legacy projects more conveniently.<\/p>\n<p><a href=\"https:\/\/github.com\/WhiteBlackGoose\/HonkSharp\" rel=\"noopener noreferrer nofollow\">Honk#<\/a> now helps to maintain the project easier, but since it&#8217;s shipped with AngouriMath now, it might be a good idea to try its syntax in some cases.<\/p>\n<h2>Conclusion<\/h2>\n<p>There are a lot of minor features and fixes that are not very interesting to read about. Most of them and other updates are listed in the <a href=\"https:\/\/am.angouri.org\/whatsnew\/\" rel=\"noopener noreferrer nofollow\">what&#8217;s new page on the website<\/a>.<\/p>\n<p>Thank you for your attention! Feel free to ask questions.<\/p>\n<h2>References<\/h2>\n<ol>\n<li>\n<p><a href=\"https:\/\/github.com\/asc-community\/AngouriMath\" rel=\"noopener noreferrer nofollow\">Github<\/a> of the project<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/am.angouri.org\/\" rel=\"noopener noreferrer nofollow\">Website<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/am.angouri.org\/whatsnew\/\" rel=\"noopener noreferrer nofollow\">Release notes<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.nuget.org\/packages\/AngouriMath\" rel=\"noopener noreferrer nofollow\">Nuget<\/a> (<a href=\"https:\/\/www.nuget.org\/packages\/AngouriMath\" rel=\"noopener noreferrer nofollow\">C#<\/a>, <a href=\"https:\/\/www.nuget.org\/packages\/AngouriMath.FSharp\" rel=\"noopener noreferrer nofollow\">F#<\/a>, <a href=\"https:\/\/www.nuget.org\/packages\/AngouriMath.Interactive\" rel=\"noopener noreferrer nofollow\">Interactive<\/a>)<\/p>\n<\/li>\n<li>\n<p>Try in <a href=\"https:\/\/mybinder.org\/v2\/gh\/asc-community\/AngouriMathLab\/try?filepath=HelloBook.AngouriMath.Interactive.ipynb\" rel=\"noopener noreferrer nofollow\">binder<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/dotnet\/runtimelab\/tree\/feature\/NativeAOT\" rel=\"noopener noreferrer nofollow\">NativeAOT<\/a> for native compilation<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/dotnet\/interactive\" rel=\"noopener noreferrer nofollow\">dotnet\/interactive<\/a> for Jupyter and notebooks<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/WhiteBlackGoose\/HonkSharp\" rel=\"noopener noreferrer nofollow\">Honk#<\/a> for convenient coding<\/p>\n<\/li>\n<li>\n<p>My <a href=\"https:\/\/twitter.com\/WhiteBlackGoose\" rel=\"noopener noreferrer nofollow\">twitter<\/a><\/p>\n<\/li>\n<\/ol>\n<h2>Thanks<\/h2>\n<p>Aside from myself, I want to thank these people for helping with the project:<\/p>\n<p><strong>Contributors<\/strong>: <a href=\"https:\/\/github.com\/Happypig375\" rel=\"noopener noreferrer nofollow\">Happypig375<\/a>, <a href=\"https:\/\/github.com\/ryyanmapes\" rel=\"noopener noreferrer nofollow\">ryynmapes<\/a>, <a href=\"https:\/\/github.com\/MomoDeve\" rel=\"noopener noreferrer nofollow\">MomoDeve<\/a>, <a href=\"https:\/\/github.com\/TheSeems\" rel=\"noopener noreferrer nofollow\">TheSeems<\/a>, <a href=\"https:\/\/github.com\/KuhakuPixel\" rel=\"noopener noreferrer nofollow\">KuhakuPixel<\/a>, <a href=\"https:\/\/github.com\/jaimeadf\" rel=\"noopener noreferrer nofollow\">jaimeadf<\/a>, <a href=\"https:\/\/github.com\/yoshiask\" rel=\"noopener noreferrer nofollow\">yoshiask<\/a>.<\/p>\n<p><strong>Consultants<\/strong>: <a href=\"https:\/\/github.com\/Happypig375\" rel=\"noopener noreferrer nofollow\">Happypig375<\/a>, mednik.<\/p>\n<p><strong>Sponsors<\/strong>: zyzhu.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/565996\/\"> https:\/\/habr.com\/ru\/articles\/565996\/<\/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-387098","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/387098","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=387098"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/387098\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=387098"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=387098"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=387098"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}