Skip to content

Commit

Permalink
Added support of complex numbers. (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonovAnton authored Oct 10, 2024
1 parent fd99c4f commit 4fd4209
Show file tree
Hide file tree
Showing 63 changed files with 4,209 additions and 959 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
```
BenchmarkDotNet v0.13.12, Windows 11 (10.0.22631.4249/23H2/2023Update/SunValley3)
BenchmarkDotNet v0.13.12, Windows 11 (10.0.22631.4317/23H2/2023Update/SunValley3)
11th Gen Intel Core i7-11800H 2.30GHz, 1 CPU, 16 logical and 8 physical cores
.NET SDK 8.0.400
[Host] : .NET 6.0.33 (6.0.3324.36610), X64 RyuJIT AVX2
Expand All @@ -9,29 +9,29 @@ BenchmarkDotNet v0.13.12, Windows 11 (10.0.22631.4249/23H2/2023Update/SunValley3
```
| Method | Job | Runtime | Mean | Error | StdDev | Gen0 | Gen1 | Allocated |
|----------------------------------------------------------------------------- |--------- |--------- |---------------:|------------:|------------:|-------:|-------:|----------:|
| 'MathEvaluator: "22888.32 * 30 / 323.34 / .5 - -1 / (2 + 22888.32) * 4 - 6"' | .NET 6.0 | .NET 6.0 | 19,935.011 ns | 242.3083 ns | 226.6553 ns | 0.4883 | 0.2441 | 6319 B |
| 'NCalc: "22888.32 * 30 / 323.34 / .5 - -1 / (2 + 22888.32) * 4 - 6"' | .NET 6.0 | .NET 6.0 | 35,031.552 ns | 198.5465 ns | 176.0063 ns | 0.6714 | 0.3052 | 8919 B |
| 'MathEvaluator: "true or not false and (true or false)"' | .NET 6.0 | .NET 6.0 | 23,969.974 ns | 193.2862 ns | 180.8000 ns | 0.5493 | 0.2747 | 7048 B |
| 'NCalc: "true or not false and (true or false)"' | .NET 6.0 | .NET 6.0 | 25,754.904 ns | 290.9546 ns | 257.9237 ns | 0.3967 | 0.1831 | 5215 B |
| 'MathEvaluator: "A or not B and (C or B)"' | .NET 6.0 | .NET 6.0 | 97,613.829 ns | 495.5810 ns | 463.5668 ns | 0.7324 | 0.3662 | 9264 B |
| 'NCalc: "A or not B and (C or B)"' | .NET 6.0 | .NET 6.0 | 81,902.216 ns | 629.5435 ns | 588.8754 ns | 0.4883 | 0.2441 | 6662 B |
| 'MathEvaluator: fn(new BooleanVariables { A = a, B = b, C = c })' | .NET 6.0 | .NET 6.0 | 3.008 ns | 0.0299 ns | 0.0249 ns | 0.0019 | - | 24 B |
| 'NCalc: fn(new BooleanVariables { A = a, B = b, C = c })' | .NET 6.0 | .NET 6.0 | 3.371 ns | 0.0549 ns | 0.0514 ns | 0.0019 | - | 24 B |
| 'MathEvaluator: "Sin(pi/6) + Cos(pi/3)"' | .NET 6.0 | .NET 6.0 | 75,073.739 ns | 435.9913 ns | 407.8266 ns | 0.3662 | 0.1221 | 6098 B |
| 'NCalc: "Sin(pi/6) + Cos(pi/3)"' | .NET 6.0 | .NET 6.0 | 36,721.397 ns | 191.0277 ns | 149.1419 ns | 0.6104 | 0.3052 | 8063 B |
| 'MathEvaluator: "Sin(a) + Cos(b)"' | .NET 6.0 | .NET 6.0 | 91,956.152 ns | 495.6916 ns | 463.6703 ns | 0.4883 | 0.2441 | 7197 B |
| 'NCalc: "Sin(a) + Cos(b)"' | .NET 6.0 | .NET 6.0 | 66,189.395 ns | 565.4448 ns | 528.9174 ns | 0.6104 | 0.2441 | 8510 B |
| 'MathEvaluator: "22888.32 * 30 / 323.34 / .5 - -1 / (2 + 22888.32) * 4 - 6"' | .NET 8.0 | .NET 8.0 | 17,296.169 ns | 149.3702 ns | 139.7210 ns | 0.4883 | 0.4578 | 6319 B |
| 'NCalc: "22888.32 * 30 / 323.34 / .5 - -1 / (2 + 22888.32) * 4 - 6"' | .NET 8.0 | .NET 8.0 | 30,247.428 ns | 186.2291 ns | 165.0872 ns | 0.6104 | 0.4883 | 8231 B |
| 'MathEvaluator: "true or not false and (true or false)"' | .NET 8.0 | .NET 8.0 | 20,531.579 ns | 157.8084 ns | 139.8930 ns | 0.5493 | 0.4883 | 7096 B |
| 'NCalc: "true or not false and (true or false)"' | .NET 8.0 | .NET 8.0 | 21,781.408 ns | 176.4773 ns | 165.0770 ns | 0.3967 | 0.3662 | 5263 B |
| 'MathEvaluator: "A or not B and (C or B)"' | .NET 8.0 | .NET 8.0 | 98,758.682 ns | 786.9071 ns | 657.1030 ns | 0.7324 | 0.4883 | 9312 B |
| 'NCalc: "A or not B and (C or B)"' | .NET 8.0 | .NET 8.0 | 78,691.382 ns | 581.1694 ns | 543.6263 ns | 0.4883 | 0.2441 | 6710 B |
| 'MathEvaluator: fn(new BooleanVariables { A = a, B = b, C = c })' | .NET 8.0 | .NET 8.0 | 2.637 ns | 0.0186 ns | 0.0155 ns | 0.0019 | - | 24 B |
| 'NCalc: fn(new BooleanVariables { A = a, B = b, C = c })' | .NET 8.0 | .NET 8.0 | 3.047 ns | 0.0192 ns | 0.0179 ns | 0.0019 | - | 24 B |
| 'MathEvaluator: "Sin(pi/6) + Cos(pi/3)"' | .NET 8.0 | .NET 8.0 | 102,271.216 ns | 634.2132 ns | 593.2435 ns | 0.2441 | - | 6092 B |
| 'NCalc: "Sin(pi/6) + Cos(pi/3)"' | .NET 8.0 | .NET 8.0 | 34,417.425 ns | 264.5679 ns | 247.4770 ns | 0.6104 | 0.4883 | 8255 B |
| 'MathEvaluator: "Sin(a) + Cos(b)"' | .NET 8.0 | .NET 8.0 | 114,923.618 ns | 609.4532 ns | 570.0829 ns | 0.4883 | 0.2441 | 7197 B |
| 'NCalc: "Sin(a) + Cos(b)"' | .NET 8.0 | .NET 8.0 | 60,920.799 ns | 160.9769 ns | 142.7018 ns | 0.6104 | 0.4883 | 8510 B |
| Method | Job | Runtime | Mean | Error | StdDev | Gen0 | Gen1 | Allocated |
|----------------------------------------------------------------------------- |--------- |--------- |---------------:|--------------:|--------------:|-------:|-------:|----------:|
| 'MathEvaluator: "22888.32 * 30 / 323.34 / .5 - -1 / (2 + 22888.32) * 4 - 6"' | .NET 6.0 | .NET 6.0 | 16,504.999 ns | 325.3588 ns | 506.5444 ns | 0.3967 | 0.1831 | 5127 B |
| 'NCalc: "22888.32 * 30 / 323.34 / .5 - -1 / (2 + 22888.32) * 4 - 6"' | .NET 6.0 | .NET 6.0 | 36,285.940 ns | 335.5370 ns | 280.1886 ns | 0.6714 | 0.3052 | 8919 B |
| 'MathEvaluator: "true or not false and (true or false)"' | .NET 6.0 | .NET 6.0 | 16,216.205 ns | 322.9499 ns | 614.4458 ns | 0.3662 | 0.1831 | 4624 B |
| 'NCalc: "true or not false and (true or false)"' | .NET 6.0 | .NET 6.0 | 25,915.796 ns | 503.3535 ns | 446.2098 ns | 0.4272 | 0.2136 | 5392 B |
| 'MathEvaluator: "A or not B and (C or B)"' | .NET 6.0 | .NET 6.0 | 102,803.996 ns | 1,405.7737 ns | 1,314.9616 ns | 0.6104 | 0.2441 | 9092 B |
| 'NCalc: "A or not B and (C or B)"' | .NET 6.0 | .NET 6.0 | 88,476.193 ns | 1,293.5966 ns | 1,210.0311 ns | 0.4883 | 0.2441 | 6838 B |
| 'MathEvaluator: fn(new BooleanVariables { A = a, B = b, C = c })' | .NET 6.0 | .NET 6.0 | 3.009 ns | 0.0818 ns | 0.1120 ns | 0.0019 | - | 24 B |
| 'NCalc: fn(new BooleanVariables { A = a, B = b, C = c })' | .NET 6.0 | .NET 6.0 | 2.939 ns | 0.0789 ns | 0.1228 ns | 0.0019 | - | 24 B |
| 'MathEvaluator: "Sin(pi/6) + Cos(pi/3)"' | .NET 6.0 | .NET 6.0 | 77,334.639 ns | 1,336.7288 ns | 1,250.3770 ns | 0.3662 | 0.1221 | 5683 B |
| 'NCalc: "Sin(pi/6) + Cos(pi/3)"' | .NET 6.0 | .NET 6.0 | 39,297.701 ns | 633.9113 ns | 561.9458 ns | 0.6104 | 0.3052 | 8063 B |
| 'MathEvaluator: "Sin(a) + Cos(b)"' | .NET 6.0 | .NET 6.0 | 95,215.538 ns | 910.7460 ns | 851.9124 ns | 0.4883 | 0.2441 | 7197 B |
| 'NCalc: "Sin(a) + Cos(b)"' | .NET 6.0 | .NET 6.0 | 70,377.416 ns | 1,388.6379 ns | 1,853.7918 ns | 0.6104 | 0.2441 | 8510 B |
| 'MathEvaluator: "22888.32 * 30 / 323.34 / .5 - -1 / (2 + 22888.32) * 4 - 6"' | .NET 8.0 | .NET 8.0 | 13,624.961 ns | 224.8156 ns | 210.2927 ns | 0.3967 | 0.3815 | 5127 B |
| 'NCalc: "22888.32 * 30 / 323.34 / .5 - -1 / (2 + 22888.32) * 4 - 6"' | .NET 8.0 | .NET 8.0 | 29,437.751 ns | 534.5125 ns | 499.9834 ns | 0.6104 | 0.4883 | 8231 B |
| 'MathEvaluator: "true or not false and (true or false)"' | .NET 8.0 | .NET 8.0 | 13,410.380 ns | 259.0581 ns | 277.1893 ns | 0.3662 | 0.3510 | 4624 B |
| 'NCalc: "true or not false and (true or false)"' | .NET 8.0 | .NET 8.0 | 21,049.444 ns | 347.7194 ns | 325.2569 ns | 0.4272 | 0.3967 | 5440 B |
| 'MathEvaluator: "A or not B and (C or B)"' | .NET 8.0 | .NET 8.0 | 96,048.106 ns | 1,253.0259 ns | 1,110.7748 ns | 0.4883 | 0.2441 | 9136 B |
| 'NCalc: "A or not B and (C or B)"' | .NET 8.0 | .NET 8.0 | 82,018.981 ns | 1,363.3945 ns | 1,275.3201 ns | 0.4883 | 0.2441 | 6886 B |
| 'MathEvaluator: fn(new BooleanVariables { A = a, B = b, C = c })' | .NET 8.0 | .NET 8.0 | 2.784 ns | 0.0360 ns | 0.0300 ns | 0.0019 | - | 24 B |
| 'NCalc: fn(new BooleanVariables { A = a, B = b, C = c })' | .NET 8.0 | .NET 8.0 | 2.935 ns | 0.0808 ns | 0.1079 ns | 0.0019 | - | 24 B |
| 'MathEvaluator: "Sin(pi/6) + Cos(pi/3)"' | .NET 8.0 | .NET 8.0 | 98,792.686 ns | 1,442.1696 ns | 1,875.2279 ns | 0.2441 | - | 5677 B |
| 'NCalc: "Sin(pi/6) + Cos(pi/3)"' | .NET 8.0 | .NET 8.0 | 32,451.434 ns | 236.4733 ns | 221.1972 ns | 0.6104 | 0.4883 | 7967 B |
| 'MathEvaluator: "Sin(a) + Cos(b)"' | .NET 8.0 | .NET 8.0 | 113,623.106 ns | 1,975.6525 ns | 1,751.3645 ns | 0.4883 | 0.2441 | 7197 B |
| 'NCalc: "Sin(a) + Cos(b)"' | .NET 8.0 | .NET 8.0 | 59,722.565 ns | 1,148.5005 ns | 1,322.6149 ns | 0.4883 | 0.2441 | 8506 B |
Loading

0 comments on commit 4fd4209

Please sign in to comment.