BigNumbersNet 1.0.2
See the version list below for details.
dotnet add package BigNumbersNet --version 1.0.2
NuGet\Install-Package BigNumbersNet -Version 1.0.2
<PackageReference Include="BigNumbersNet" Version="1.0.2" />
<PackageVersion Include="BigNumbersNet" Version="1.0.2" />
<PackageReference Include="BigNumbersNet" />
paket add BigNumbersNet --version 1.0.2
#r "nuget: BigNumbersNet, 1.0.2"
#:package BigNumbersNet@1.0.2
#addin nuget:?package=BigNumbersNet&version=1.0.2
#tool nuget:?package=BigNumbersNet&version=1.0.2
BigNumbersNet
A simple arbitrary-precision integer library for .NET, facilitating calculations for exceptionally large numbers.
Features
- Immutable Data Type: Prevents unintended side-effects with thread-safe math operations.
- Full Operator Overloading: Seamlessly write expressions using standard operators (
+,-,*,/,%,<,>,==). - Standard Math Functions: Out-of-the-box support for
Abs,Pow,Max,Min, andGreatestCommonDivisor (GCD). - Targeting Modern Frameworks: Optimized for both .NET 8 and .NET 10.
Installation
Install via the NuGet Package Manager:
dotnet add package BigNumbersNet
Quick Start
using BigNumbersNet;
// Parsing large values
BigNumber val1 = BigNumber.Parse("987654321012345678901234567890");
BigNumber val2 = BigNumber.Parse("123456789012345678901234567890");
// Standard operations
BigNumber sum = val1 + val2;
BigNumber difference = val1 - val2;
BigNumber product = val1 * val2;
BigNumber quotient = val1 / val2;
BigNumber remainder = val1 % val2;
// Advanced Math
BigNumber gcd = BigNumber.GreatestCommonDivisor(val1, val2);
BigNumber raised = BigNumber.Pow(BigNumber.Parse("5"), 100);
Console.WriteLine($"Sum: {sum}");
Console.WriteLine($"GCD: {gcd}");
Performance & Design Note
The library stores decimal digits internally in base-10 byte arrays, reducing allocation overhead and memory mutations. While it is stable for basic mathematical assertions, it relies on schoolbook implementation algorithms. For cryptographically secure operations or heavy high-performance computations, we recommend reviewing performance against platform-standard System.Numerics.BigInteger.
License
This project is licensed under the GPL-3.0 license.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
-
net8.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.