TedToolkit.Mathematics.Asymptotic 2026.6.23.1

dotnet add package TedToolkit.Mathematics.Asymptotic --version 2026.6.23.1
                    
NuGet\Install-Package TedToolkit.Mathematics.Asymptotic -Version 2026.6.23.1
                    
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="TedToolkit.Mathematics.Asymptotic" Version="2026.6.23.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TedToolkit.Mathematics.Asymptotic" Version="2026.6.23.1" />
                    
Directory.Packages.props
<PackageReference Include="TedToolkit.Mathematics.Asymptotic" />
                    
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 TedToolkit.Mathematics.Asymptotic --version 2026.6.23.1
                    
#r "nuget: TedToolkit.Mathematics.Asymptotic, 2026.6.23.1"
                    
#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 TedToolkit.Mathematics.Asymptotic@2026.6.23.1
                    
#: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=TedToolkit.Mathematics.Asymptotic&version=2026.6.23.1
                    
Install as a Cake Addin
#tool nuget:?package=TedToolkit.Mathematics.Asymptotic&version=2026.6.23.1
                    
Install as a Cake Tool

TedToolkit.Mathematics.Asymptotic

TedToolkit.Mathematics.Asymptotic models polynomial-like asymptotic expressions as x -> +infinity.

Use it when your code needs explicit reasoning about:

  • normalized terms
  • leading-order growth
  • limit classification
  • arithmetic over asymptotic expressions

Installation

dotnet add package TedToolkit.Mathematics.Asymptotic

Core Types

PolynomialTerm<TCoefficient, TExponent>

Represents a single term such as 3ω², -5ω, 7, or 2ω⁻¹.

  • TCoefficient must satisfy INumber<TCoefficient>
  • TExponent must satisfy ISignedNumber<TExponent> and INumber<TExponent>
  • a zero coefficient is normalized to exponent 0

LimitPolynomial<TCoefficient, TExponent>

Represents a normalized collection of terms ordered by descending exponent.

During construction:

  • terms with the same exponent are merged
  • zero-coefficient terms are removed
  • terms are stored in descending exponent order
  • an all-zero input becomes a single zero term

LimitResult<TValue> and LimitState

Represents the limit classification returned by LimitValue.

Possible states are:

  • FINITE
  • POSITIVE_INFINITY
  • NEGATIVE_INFINITY
  • POSITIVE_INFINITESIMAL
  • NEGATIVE_INFINITESIMAL

Basic Usage

using TedToolkit.Mathematics.Asymptotic;

var expression = new LimitPolynomial<double, int>(
[
    new PolynomialTerm<double, int>(3, 2),
    new PolynomialTerm<double, int>(-4, 1),
    new PolynomialTerm<double, int>(10, 0),
]);

Console.WriteLine(expression);

If multiple terms use the same exponent, they are merged automatically:

var simplified = new LimitPolynomial<double, int>(
[
    new PolynomialTerm<double, int>(3, 2),
    new PolynomialTerm<double, int>(5, 2),
    new PolynomialTerm<double, int>(-8, 2),
    new PolynomialTerm<double, int>(1, 0),
]);

Console.WriteLine(simplified); // 1

Limit Evaluation

LimitValue is determined by the leading term.

var polynomial = new LimitPolynomial<double, int>(
[
    new PolynomialTerm<double, int>(-2, 3),
    new PolynomialTerm<double, int>(5, 0),
]);

Console.WriteLine(polynomial.LimitValue);

Examples of the returned classification:

  • positive coefficient with positive exponent → positive infinity
  • negative coefficient with positive exponent → negative infinity
  • exponent 0 → finite constant
  • positive coefficient with negative exponent → positive infinitesimal
  • negative coefficient with negative exponent → negative infinitesimal

Growth Comparison

Use CompareGrowthRateTo when only the leading term matters:

var left = new LimitPolynomial<double, int>(new PolynomialTerm<double, int>(2, 3));
var right = new LimitPolynomial<double, int>(new PolynomialTerm<double, int>(1, 2));

Console.WriteLine(left.CompareGrowthRateTo(right) > 0); // True

Use EqualsGrowthRate when two expressions should be treated as having the same leading-order behavior:

var a = new LimitPolynomial<double, int>(
[
    new PolynomialTerm<double, int>(2, 3),
    new PolynomialTerm<double, int>(1, 0),
]);

var b = new LimitPolynomial<double, int>(
[
    new PolynomialTerm<double, int>(2, 3),
    new PolynomialTerm<double, int>(-100, 1),
]);

Console.WriteLine(a.EqualsGrowthRate(b)); // True

Arithmetic and Comparison

LimitPolynomial<TCoefficient, TExponent> supports:

  • comparison operators: ==, !=, <, <=, >, >=
  • arithmetic operators: +, -, unary +, unary -, *, /, %
var x2 = new LimitPolynomial<double, int>([new PolynomialTerm<double, int>(1, 2)]);
var x = new LimitPolynomial<double, int>([new PolynomialTerm<double, int>(1, 1)]);

var sum = x2 + x;
var product = x2 * x;
var quotient = product / x2;

Console.WriteLine(sum);
Console.WriteLine(product);
Console.WriteLine(quotient);

Formatting

PolynomialTerm<TCoefficient, TExponent> and LimitPolynomial<TCoefficient, TExponent> support formatted string output.

var polynomial = new LimitPolynomial<double, int>(
[
    new PolynomialTerm<double, int>(12.5, 12),
    new PolynomialTerm<double, int>(-3.25, -2),
]);

Console.WriteLine(polynomial.ToString("0.00", "00", null));

The default string form uses ω notation, for example (2ω³ - 4ω + 6).

Notes

  • This package models behavior only for x -> +infinity.
  • LimitPolynomial<TCoefficient, TExponent> implements numeric-style interfaces and exposes parse members, but parsing is not currently supported.
  • Generic parameters must satisfy the .NET numeric interface constraints used by the public types.

Target Frameworks

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

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
2026.6.23.1 134 6/23/2026
2026.6.23 120 6/23/2026