Numerinus.Core 1.0.9

Prefix Reserved
dotnet add package Numerinus.Core --version 1.0.9
                    
NuGet\Install-Package Numerinus.Core -Version 1.0.9
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Numerinus.Core" Version="1.0.9" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Numerinus.Core" Version="1.0.9" />
                    
Directory.Packages.props
<PackageReference Include="Numerinus.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Numerinus.Core --version 1.0.9
                    
#r "nuget: Numerinus.Core, 1.0.9"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Numerinus.Core@1.0.9
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Numerinus.Core&version=1.0.9
                    
Install as a Cake Addin
#tool nuget:?package=Numerinus.Core&version=1.0.9
                    
Install as a Cake Tool

Numerinus.Core ๐Ÿงฎ

The foundational engine for the Numerinus mathematical suite. This package provides the core interfaces, high-precision constants, and base numerical types used across all Numerinus modules.

NuGet License: MIT


Features

  • Generic Math Infrastructure โ€” IArithmetic<T> interface for building type-safe, generic numerical algorithms.
  • Advanced Numerics โ€” Built-in ComplexNumber and Scalar types ready to use out of the box.
  • High Precision โ€” Accuracy utility for reliable floating-point epsilon comparisons.
  • Mathematical Constants โ€” High-precision values for ฯ€, e, and ฯ† available globally.

Installation

dotnet add package Numerinus.Core

using Numerinus.Core.Numerics; var c1 = new ComplexNumber(10, 5); var c2 = new ComplexNumber(2, 3); var sum = ComplexNumber.Add(c1, c2);
// 12 + 8i var diff = ComplexNumber.Subtract(c1, c2); // 8 + 2i var product = ComplexNumber.Multiply(c1, c2); // 5 + 40i var quotient = ComplexNumber.Divide(c1, c2); // 2.846... + (-0.769...)i Console.WriteLine(sum); // 12 + 8i Console.WriteLine(c1.IsZero()); // False

Scalar

using Numerinus.Core.Numerics; Scalar a = 6.0; // implicit conversion from double Scalar b = 2.0; var result = Scalar.Multiply(a, b); double value = result; // implicit conversion back to double โ†’ 12.0 Console.WriteLine(result); // 12 Console.WriteLine(Scalar.Zero); // 0 Console.WriteLine(Scalar.One); // 1

Accuracy

using Numerinus.Core.Precision; // Direct equality is unreliable for floating-point bool wrong = (0.1 + 0.2 == 0.3); // False โŒ bool correct = Accuracy.AreEqual(0.1 + 0.2, 0.3); // True โœ… // High precision comparison bool precise = Accuracy.AreEqual(a, b, Accuracy.HighPrecisionEpsilon);

Constants

using Numerinus.Core.Constants; double circumference = 2 * NumerinusConstants.Pi * radius; double growth = Math.Pow(NumerinusConstants.E, x); double spiral = NumerinusConstants.GoldenRatio * n;


API Reference

IArithmetic<T> โ€” Numerinus.Core.Interfaces

The central contract every numeric type in the Numerinus suite implements. public interface IArithmetic<T> where T : IArithmetic<T>

Member Kind Description
Add(T left, T right) Static method Returns left + right
Subtract(T left, T right) Static method Returns left - right
Multiply(T left, T right) Static method Returns left ร— right
Divide(T left, T right) Static method Returns left รท right
Zero Static property Additive identity
One Static property Multiplicative identity
IsZero(double epsilon) Instance method Precision-aware zero check (default ฮต = 1e-15)

ComplexNumber โ€” Numerinus.Core.Numerics

Immutable class representing a complex number of the form a + bi.

Member Type Description
Real double The real component a
Imaginary double The imaginary component b
Zero ComplexNumber 0 + 0i
One ComplexNumber 1 + 0i
IsZero(epsilon) bool True if both components are within epsilon of zero
ToString() string Returns "a + bi"

All arithmetic operations return a new instance โ€” ComplexNumber is fully immutable.


Scalar โ€” Numerinus.Core.Numerics

Immutable readonly struct wrapping a double. Supports implicit conversion to and from double.

Member Type Description
Value double The underlying value
Zero Scalar Scalar(0)
One Scalar Scalar(1)
implicit operator Scalar(double) โ€” Allows Scalar s = 5.0
implicit operator double(Scalar) โ€” Allows double d = s

Accuracy โ€” Numerinus.Core.Precision

Member Value Description
StandardEpsilon 1e-15 Default precision threshold
HighPrecisionEpsilon 1e-18 High-precision threshold
AreEqual(a, b, epsilon) โ€” Returns true if \|a โˆ’ b\| < epsilon

NumerinusConstants โ€” Numerinus.Core.Constants

Constant Value Description
Pi 3.14159265358979323846 ฯ€
E 2.71828182845904523536 Euler's number
GoldenRatio 1.61803398874989484820 ฯ† (phi)

Writing Generic Algorithms

IArithmetic<T> enables fully generic numerical algorithms that work across any compatible type:

using Numerinus.Core.Interfaces; static T Sum<T>(IEnumerable<T> items) where T : IArithmetic<T> { T result = T.Zero; foreach (var item in items) result = T.Add(result, item); return result; } // Works with ComplexNumber var complexSum = Sum(new[] { new ComplexNumber(1, 2), new ComplexNumber(3, 4) }); // โ†’ 4 + 6i // Works with Scalar Scalar scalarSum = Sum(new Scalar[] { 1.0, 2.0, 3.0 }); // โ†’ 6


Package Description
Numerinus.Algebra Matrix operations and linear algebra
Numerinus.Geometry Geometric types and transformations
Numerinus.Statistics Statistical functions and distributions

Support & Maintenance

Numerinus is an actively maintained suite of .NET libraries. To ensure that updates, bug fixes, and new performance optimizations continue to flow, consider supporting the project:

Sponsor on GitHub: Your support helps me dedicate more time to research, benchmarking, and shipping regular updates to the Numerinus ecosystem.

Feature Requests: Sponsors get priority visibility when suggesting new mathematical utilities or architectural improvements.

Keep it Alive: By sponsoring, you are investing in the long-term stability of these tools for the entire .NET community.

Stay Connected: For updates on the roadmap or to discuss the project, connect with me on LinkedIn.


License

Copyright (c) 2026 Sunil Chaware. Licensed under the MIT License. https://opensource.org/licenses/MIT

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net9.0

    • No dependencies.

NuGet packages (5)

Showing the top 5 NuGet packages that depend on Numerinus.Core:

Package Downloads
Numerinus.Algebra

Linear algebra module for the Numerinus mathematical suite. Provides a generic Matrix type built on Numerinus.Core.

Numerinus.UnitConversion

Unit conversion module for the Numerinus mathematical suite. Provides conversion between physical units built on Numerinus.Core.

Numerinus.Geometry

Geometry module for the Numerinus mathematical suite. Provides geometric types and transformations built on Numerinus.Core.

Numerinus.Finance

Financial calculations module for the Numerinus mathematical suite. Provides interest, loan, depreciation, and investment calculators.

Numerinus.Electrical

Electrical engineering calculations module for the Numerinus mathematical suite. Provides Ohm's law, power, circuit, and AC circuit calculators.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.9 39 4/10/2026
1.0.8 103 4/6/2026
1.0.7 90 4/6/2026
1.0.6 112 4/3/2026
1.0.5 111 4/1/2026
1.0.4 176 3/31/2026
1.0.3 98 3/30/2026
1.0.2 168 3/27/2026
1.0.1 115 3/26/2026
1.0.0 95 3/25/2026