TheSquid.Numerics.Extensions
0.6.20581.1
Prefix Reserved
See the version list below for details.
dotnet add package TheSquid.Numerics.Extensions --version 0.6.20581.1
NuGet\Install-Package TheSquid.Numerics.Extensions -Version 0.6.20581.1
<PackageReference Include="TheSquid.Numerics.Extensions" Version="0.6.20581.1" />
paket add TheSquid.Numerics.Extensions --version 0.6.20581.1
#r "nuget: TheSquid.Numerics.Extensions, 0.6.20581.1"
// Install TheSquid.Numerics.Extensions as a Cake Addin #addin nuget:?package=TheSquid.Numerics.Extensions&version=0.6.20581.1 // Install TheSquid.Numerics.Extensions as a Cake Tool #tool nuget:?package=TheSquid.Numerics.Extensions&version=0.6.20581.1
TheSquid.Numerics.Extensions
C# implementation of extension methods for BigInteger data type. Such as extracting an Nth root, generating a random value, and so on. By Nikolai TheSquid.
I will be glad to merge your pull requests for improve calculation performance. Even if the improvement affects only individual cases from the range of values.
NthRootExtension
C# implementation of an extension method to quickly calculate an Nth root (including square root) for BigInteger value.
How to use
Basicly you can copy class NthRootExtension to your project and add using namespace TheSquid.Numerics.Extensions. Another option is to add the TheSquid.Numerics.Extensions package from the nuget repository to your project's dependencies. For an example of calling an extension method, you can look at the code of the corresponding test class NthRootExtensionTests.
How to test
You can start random NthRoot tests right after clone repository and build solution. You must run generate tests and rebuild solution before start speed Nth root tests.
How to understand
The extension method uses two root calculation algorithms: well-known Newton's method and digit-by-digit method. As the degree of the root increases, the calculation by the Newton method slows down, and the digit-by-digit method accelerates. With a root radicand value order of 100,000 decimal digits, the dependence of the calculation speed on the degree of the root is as follows:
NextBigIntegerExtension
C# implementation of an extension method to generate random BigInteger value within the specified range.
How to use
Basicly you can copy class NextBigIntegerExtension to your project and add using namespace TheSquid.Numerics.Extensions. Another option is to add the TheSquid.Numerics.Extensions package from the nuget repository to your project's dependencies. For an example of calling an extension method, you can look at the code of the corresponding test class NextBigIntegerExtensionTests.
How to test
You can start random NextBigInteger tests from project TheSquid.Numerics.Extensions.Tests right after clone repository and build solution.
How to understand
Extension method for the system class Random. Method uses instance of Random class to generate an array of random bytes.
PowCachedExtension
C# implementation of an extension method for calculating powers of repeating BigInteger values using a cache.
How to use
Basicly you can copy class PowCachedExtension to your project and add using namespace TheSquid.Numerics.Extensions. Another option is to add the TheSquid.Numerics.Extensions package from the nuget repository to your project's dependencies. For an example of calling an extension method, you can look at the code of the corresponding test class PowCachedExtensionTests.
How to test
You can start random PowCached tests from project TheSquid.Numerics.Extensions.Tests right after clone repository and build solution.
How to understand
Acceleration is achieved by memorizing results of computing degrees, as well as memorizing the intermediate results obtained in calculation progress. With random basement values in range from 0 to 1000, random exponent values in range from 0 to 1000 and iterations count up to 2000000, the dependence of the calculation speed on cache filling is as follows:
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.7.35452.1 | 239 | 10/21/2023 |
0.6.20581.1 | 179 | 8/17/2023 |
0.5.25646.1 | 149 | 8/15/2023 |
0.4.20363.1 | 163 | 8/14/2023 |
0.3.17043.1 | 156 | 8/12/2023 |