NumeralSystems.Net
1.0.0
See the version list below for details.
dotnet add package NumeralSystems.Net --version 1.0.0
NuGet\Install-Package NumeralSystems.Net -Version 1.0.0
<PackageReference Include="NumeralSystems.Net" Version="1.0.0" />
<PackageVersion Include="NumeralSystems.Net" Version="1.0.0" />
<PackageReference Include="NumeralSystems.Net" />
paket add NumeralSystems.Net --version 1.0.0
#r "nuget: NumeralSystems.Net, 1.0.0"
#:package NumeralSystems.Net@1.0.0
#addin nuget:?package=NumeralSystems.Net&version=1.0.0
#tool nuget:?package=NumeralSystems.Net&version=1.0.0
NumeralSystem
This library is inteded to simplify the creation/usage of numeral systems.
Usage
Creation of numeral system
To create a numeral system by It's construnctor you must define an identity of unique elements and a string separator.
public NumeralSystem(HashSet<TElement> identity, string separator = ";")
Otherwhise you can create a numeral system with the identity dimension by calling:
public static NumeralSystem<string> Numeral.System.OfBase(int value, string separator = "")
Like so:
var binary = Numeral.System.OfBase(2);
Indexing a numeral
You can get a numeral from It's index (int or float):
var valueA = binary[12];
var valueB = binary[1.2f];
Parsing a string
You can parse a string to It's numeral representation with the StringParse method:
var valueC = binary.StringParse("1100");
Conversions
A numeral can be converted to:
An integer
var a = valueA.Integer;
A float
var b = valueB.Float;
A string
var c = valueC.ToString();
A number of another base
var d = valueC.To(Numeral.System.OfBase(5));
Customizations
You can create your custom Numeral System by providing:
A custom string parser.
By calling the setter of "Func<string, Numeral<TElement>> StringParse" in the NumeralSystem class
The indexing mechanism.
By calling the setter of "Func<int, bool, List<TElement>, List<TElement>> IntIndexer" in the NumeralSystem class
The string conversion mechanism.
By calling the setter of "Func<(List<TElement> Integral, List<TElement> Fractional, bool IsPositive), string> StringConverter" in the NumeralSystem class
The negative simbol.
By calling the setter of "string NegativeSign" in the NumeralSystem class
The CultureInfo (That provides the default symbols for negative and floats)
By calling the setter of "CultureInfo CultureInfo" in the NumeralSystem class
The Float symbol.
By calling the setter of "string FloatSign" in the NumeralSystem class
The Separator. (If the string representing the value is longer than 1 char)
By calling the setter of "string Separator" in the NumeralSystem class
UnitTest
To test the functionalities you can use NumeralSystem.Net.NUnit
Test
To test the implementations you can use the UI project NumeralConverter that features a conversion from base to base.
Missing features
Math
Math will be implemented as a separate library with NumeralSystem.Net as a dependency
Incomplete numeral
Incomplete numerals will be implemented in this library as a new feature after the introduction of the math library
Nuget
You can use the library here from Nuget.org
| 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. 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 was computed. 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. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | 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.1
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on NumeralSystems.Net:
| Package | Downloads |
|---|---|
|
AnyBase.Net
Encode and decode text or bytes with any ordered alphabet. |
|
|
NumeralSystems.Net.Json
Explicit System.Text.Json integration for exact NumeralSystems.Net values. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 5.3.0 | 360 | 8/1/2026 | |
| 5.2.0 | 124 | 8/1/2026 | |
| 5.1.0 | 121 | 7/31/2026 | |
| 5.0.0 | 107 | 7/31/2026 | |
| 4.8.1 | 94 | 7/31/2026 | |
| 4.8.0 | 100 | 7/31/2026 | |
| 4.7.0 | 102 | 7/31/2026 | |
| 4.6.0 | 97 | 7/31/2026 | |
| 4.5.2 | 106 | 7/30/2026 | |
| 4.5.1 | 288 | 12/8/2024 | |
| 4.5.0 | 177 | 12/8/2024 | |
| 4.4.0.1 | 208 | 12/7/2024 | |
| 4.4.0 | 204 | 12/7/2024 | |
| 4.3.0 | 201 | 9/10/2024 | |
| 3.0.0 | 603 | 4/18/2022 | |
| 1.0.1 | 556 | 4/2/2022 | |
| 1.0.0 | 417 | 1/7/2022 | |
| 0.5.0 | 436 | 12/19/2021 |