Skip to content

ulfendk/Numbers

 
 

Repository files navigation

Numbers

NuGet Status

Download source code: ZIP file

If you like this software, consider donating to me at this link: http://peteroupc.github.io/


A C# library that supports arbitrary-precision binary and decimal floating-point numbers and rational numbers with arbitrary-precision components.

Source code is available in the project page.

How to Install

The library is available in the NuGet Package Gallery under the name PeterO.Numbers. To install this library as a NuGet package, enter Install-Package PeterO.Numbers in the NuGet Package Manager Console.

Documentation

See the C# (.NET) API documentation.

Examples

For more examples, see examples.md.

About

Written by Peter O. in 2017.

Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/

If you like this, you should donate to Peter O. at: http://peteroupc.github.io/Numbers/

Release notes

Version 1.0.1

  • Really strong-name sign the assembly, which (probably) was inadvertently delay-signed in version 1.0.

Version 1.0

  • Filled out documentation so that there are no more undocumented parts

Version 0.5

  • Moved from .NET Portable to .NET Standard 1.0. Contributed by GitHub user NZSmartie
  • Broke backwards compatibility with .NET Framework 4.0
  • Bug fixes

Version 0.4:

  • Assembly signed with a strong name
  • Some improvements to documentation

Version 0.3:

  • Deprecated ERational constructor
  • Added many type conversion operators and methods to EDecimal, EFloat, ERational, and EInteger
  • Added FromString, CompareToTotal, and CompareToTotalMagnitude methods to ERational
  • An overload of RoundToExponentExact in EDecimal is no longer obsolete and uses the rounding mode specified
  • Used a new division implementation in EInteger
  • Used the new division implementation to optimize conversion of huge EIntegers to decimal strings
  • Bug fixes

Version 0.2.2:

  • Previous assembly was released with wrong version number

Version 0.2.1:

  • Fixed corner cases in EFloat's ToSingle and ToDouble methods

Version 0.2:

  • Performance improvements
  • Added several overloads for DivideToExponent method
  • GCD code in EInteger rewritten
  • Added CopySign, CompareToTotal, and CompareToTotalMagnitude methods to EDecimal and EFloat.
  • Renamed several methods in EDecimal and EFloat
  • RoundToIntegral* methods renamed to RoundToInteger* methods
  • Renamed some EInteger integer conversion methods; added CanFitInInt64, GetUnsignedBitLengthAsEInteger, and GetLowBitAsEInteger methods
  • Several operators added to EDecimal in C# version
  • Rewrote code that converts from decimal to binary floating-point; add ToEFloat method taking an EContext in EDecimal
  • Added ToShortestString method in EFloat
  • Add UnlimitedHalfEven EContext object
  • Bug fixes

Version 0.1:

  • Initial release

About

A C# implementation of arbitrary-precision numbers and arithmetic

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%