Skip to content

Extensions and helpers for BigInteger, including a cache that stores powers so they don't have to be computed each time.

License

Notifications You must be signed in to change notification settings

Singulink/Singulink.Numerics.BigIntegerExtensions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Singulink.Numerics.BigIntegerExtensions

Chat on Discord View nuget packages Build and Test

BigIntegerExtensions provides some helper BigInteger extension methods and a super fast power cache that serves as a replacement for BigInteger.Pow() for bases between 3 and 10 (inclusive) to quickly get cached values instead of calculating them each time they are needed. This library is used by Singulink.Numerics.BigDecimal to improve performance and support its operations.

About Singulink

We are a small team of engineers and designers dedicated to building beautiful, functional and well-engineered software solutions. We offer very competitive rates as well as fixed-price contracts and welcome inquiries to discuss any custom development / project support needs you may have.

This package is part of our Singulink Libraries collection. Visit https://github.com/Singulink to see our full list of publicly available libraries and other open-source projects.

Installation

The package is available on NuGet - simply install the Singulink.Numerics.BigIntegerExtensions package.

Supported Runtimes: Everywhere .NET Standard 2.0 is supported, including:

  • .NET
  • .NET Framework
  • Mono / Xamarin

End-of-life runtime versions that are no longer officially supported are not tested or supported by this library.

Features

  • BigIntegerPowCache for cached lookups of powers of bases 3 to 10.
  • CountDigits() and CountDigitsAndTrailingZeros() extension methods using highly optimized algorithms.
  • Divide() extension method that supports a wide range of rounding modes instead of just truncating the result like the standard division operator.

Further Reading

You can view the fully documented API on the project documentation site.

About

Extensions and helpers for BigInteger, including a cache that stores powers so they don't have to be computed each time.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages