deveel - dmath 1.7.0.108

Deveel Math is the port to .NET/Mono of the Apache Harmony Math component, that is used to handle operations on big numbers in a fast and secure way.

	This package supports all the processor architectures (Any CPU).

PM> Install-Package dmath -Version 1.7.0.108 -Source https://www.myget.org/F/deveel/api/v3/index.json

Copy to clipboard

> nuget.exe install dmath -Version 1.7.0.108 -Source https://www.myget.org/F/deveel/api/v3/index.json

Copy to clipboard

> dotnet add package dmath --version 1.7.0.108 --source https://www.myget.org/F/deveel/api/v3/index.json

Copy to clipboard
<PackageReference Include="dmath" Version="1.7.0.108" />
Copy to clipboard
source https://www.myget.org/F/deveel/api/v3/index.json

nuget dmath  ~> 1.7.0.108
Copy to clipboard

> choco install dmath --version 1.7.0.108 --source https://www.myget.org/F/deveel/api/v2

Copy to clipboard
Import-Module PowerShellGet
Register-PSRepository -Name "deveel" -SourceLocation "https://www.myget.org/F/deveel/api/v2"
Install-Module -Name "dmath" -RequiredVersion "1.7.0.108" -Repository "deveel" 
Copy to clipboard

Browse the sources in this package using Visual Studio or WinDbg by configuring the following legacy symbol server URL: https://www.myget.org/F/deveel/symbols/


NuGet NuGet Downloads Coverage

Deveel Math

This library is an opinionated port of the Java Math package provided as part of the Apache Harmony framework (now defunct), that can be used to factorize big numbers and decimals in .NET applications.

Why Deveel Math?

At the time of the development of this library, the .NET framework did not provide a native support for big numbers and decimals, and not even the System.Numerics namespace was available yet, which was limiting the operations that could be performed on big numbers.

In fact, during the development of the DeveelDB database engine, we needed a library that could handle big numbers and decimals in a more flexible way, and that could be used in a cross-platform environment.

Stil at today, the .NET framework does not provide a native support for big decimals, and the System.Numerics namespace is still limited to handling operations on big integers.

What is Deveel Math?

This is a little effort to address this gap, providing the community with a library that can be used to handle big numbers and decimals in a more flexible way.

It doesn't have any ambition to replace the System.Numerics namespace, but it can be used as a complement to it, especially when dealing with big decimals.

Given the limited knowledge of the author in the field of numerical analysis, the library is subject to reviews and any contribution to improve the quality of the code is welcome.

How to Install It

The library is available as a NuGet package, and it can be installed in any .NET application that supports the .NET 6.0 or later (prior support to .NET 4.8 and _.NET Standard 1.3 has been dropped).

The binaries are available in two deployment streams:

Type Source Package
Stable NuGet NuGet
Pre-Release GitHub Static Badge

To install the dmath library you can use the following command from the NuGet Package Manager Console on the root of your project:

PM> Install-Package dmath

or rather using the dotnet CLI:

$ dotnet add package dmath

Note: Since version 2.0.x the library has been migrated to .NET 6.0 and the support for .NET Standard 1.3 has been dropped.

BigDecimal

The BigDecimal class represents a big decimal number that can be used to perform arithmetic operations with arbitrary precision.

The class provides a set of methods to perform arithmetic operations, such as addition, subtraction, multiplication, division, and rounding.

Creating a BigDecimal

To create a new BigDecimal instance, you can use one of the following constructors:

// Creating an instance from an integer
var number = new BigDecimal(1234567890);

// Creating an instance from a long integer
var number = new BigDecimal(1234567890L);

// Creating an instance from a double
var number = new BigDecimal(1234567890.123456);

or rather from a string:

// Parsing a string to a big decimal
var number = BigDecimal.Parse("1234567890");

Contributing

If you want to contribute to the development of this library, you can fork the repository and submit a pull request with your changes.

Please make sure to follow the coding style and conventions used in the project, and to provide a clear description of the changes you are proposing.

Future Development

BigInteger Porting

When the library was first ported from Java, the BigInteger class was not included in the porting process, as the System.Numerics.BigInteger class was not available in the .NET framework yet, and thus we had to port also the BigInteger class from the Harmony framework.

Now that the System.Numerics.BigInteger class is available in the .NET framework, we can consider to remove the BigInteger class from the library, and to use the native class instead.

Performance Benchmarks

We should consider to add performance benchmarks to the library, to measure the performance of the arithmetic operations on big numbers and decimals, and to compare the performance of the library with the native .NET classes.

License

The library is released under the terms of the Apache License 2.0, and it is provided as-is without any warranty or support.

  • .NETFramework 2.0: 2.0.0.0

                        
Assembly Assembly hash Match
/lib/net20/deveel.math.pdb/deveel.math.dll c65eb92e9dab454f8a6cf258cefe0e371

Owners

Antonello Provenzano

Authors

Antonello Provenzano

Project URL

http://github.com/deveel/deveel-math

License

Apache-2.0

Tags

math decimal bigdecimal integer biginteger int deveel harmony

Info

891 total downloads
59 downloads for version 1.7.0.108
Download (63.42 KB)
Download legacy symbols (63.42 KB)
Found on the current feed only

Package history

Version Size Last updated Downloads Mirrored?
1.7.0.108 63.42 KB Thu, 06 Apr 2017 14:19:07 GMT 59
1.7.0.107 63.42 KB Thu, 06 Apr 2017 14:12:29 GMT 67
1.7.0.106 63.42 KB Thu, 06 Apr 2017 13:48:47 GMT 62
1.6.1.105 63.41 KB Thu, 06 Apr 2017 12:53:10 GMT 101
1.6.1.104 62.35 KB Sat, 01 Apr 2017 17:35:31 GMT 79
1.6.1.103 62.35 KB Sat, 01 Apr 2017 17:28:38 GMT 64
1.6.1.102 62.33 KB Sat, 01 Apr 2017 17:25:23 GMT 84
1.6.1.101 62.34 KB Sat, 01 Apr 2017 17:18:58 GMT 77
1.6.1.100 62.35 KB Sat, 01 Apr 2017 17:16:22 GMT 71
1.6.1.96 62.34 KB Sat, 01 Apr 2017 10:43:18 GMT 76
1.6.1.95 62.36 KB Sat, 01 Apr 2017 10:39:49 GMT 74
1.6.1.94 62.35 KB Sat, 01 Apr 2017 10:13:26 GMT 77