{"id":24472496,"url":"https://github.com/deveel/deveel-math","last_synced_at":"2026-03-16T08:33:16.200Z","repository":{"id":142616875,"uuid":"1436565","full_name":"deveel/deveel-math","owner":"deveel","description":"A library for handling big numbers and decimals under Mono/.NET frameworks","archived":false,"fork":false,"pushed_at":"2024-07-11T18:13:11.000Z","size":1316,"stargazers_count":51,"open_issues_count":2,"forks_count":11,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-07-03T12:57:58.709Z","etag":null,"topics":["bigdecimal","bigmath","csharp","dotnet","dotnet-core","math"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deveel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-03-03T20:23:01.000Z","updated_at":"2025-03-11T07:24:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"2318ade1-49fd-4334-83f9-d42a8fc85a73","html_url":"https://github.com/deveel/deveel-math","commit_stats":null,"previous_names":[],"tags_count":67,"template":false,"template_full_name":null,"purl":"pkg:github/deveel/deveel-math","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deveel%2Fdeveel-math","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deveel%2Fdeveel-math/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deveel%2Fdeveel-math/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deveel%2Fdeveel-math/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deveel","download_url":"https://codeload.github.com/deveel/deveel-math/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deveel%2Fdeveel-math/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265550336,"owners_count":23786543,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bigdecimal","bigmath","csharp","dotnet","dotnet-core","math"],"created_at":"2025-01-21T08:12:32.380Z","updated_at":"2026-03-16T08:33:16.135Z","avatar_url":"https://github.com/deveel.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":" [![NuGet](https://img.shields.io/nuget/v/dmath.svg?label=dmath\u0026logo=nuget)](https://www.nuget.org/packages/dmath/) ![NuGet Downloads](https://img.shields.io/nuget/dt/dmath?logo=nuget\u0026label=downloads) ![Coverage](https://img.shields.io/codecov/c/github/deveel/deveel-math?logo=codecov)\n\n\n\n# Deveel Math\n\nThis library is an __opinionated__ port of the _Java Math_ package provided as part of the [Apache Harmony](https://harmony.apache.org/) framework (now defunct), that can be used to factorize big numbers and decimals in .NET applications.\n\n## Why Deveel Math?\n\nAt 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.\n\nIn fact, during the development of the [DeveelDB](https://github.com/deveel/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.\n\nStil 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.\n\n## What is Deveel Math?\n\nThis 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.\n\nIt 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.\n\nGiven 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.\n\n## How to Install It\n\nThe 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).\n\nThe binaries are available in two deployment streams:\n\n| Type | Source | Package |\n|------|--------|---------|\n| Stable | _NuGet_ | [![NuGet](https://img.shields.io/nuget/v/dmath.svg?label=dmath\u0026logo=nuget)](https://www.nuget.org/packages/dmath/) |\n| Pre-Release | _GitHub_ | [![Static Badge](https://img.shields.io/badge/prerelease-yellow?logo=nuget\u0026label=dmath)](https://github.com/deveel/deveel-math/pkgs/nuget/dmath)\n  |\n\nTo install the `dmath` library you can use the following command from the NuGet Package Manager Console on the root of your project:\n\n```\nPM\u003e Install-Package dmath\n```\n\nor rather using the `dotnet` CLI:\n\n```\n$ dotnet add package dmath\n```\n\n__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._\n\n## BigDecimal\n\nThe `BigDecimal` class represents a big decimal number that can be used to perform arithmetic operations with arbitrary precision.\n\nThe class provides a set of methods to perform arithmetic operations, such as addition, subtraction, multiplication, division, and rounding.\n\n### Creating a BigDecimal\n\nTo create a new `BigDecimal` instance, you can use one of the following constructors:\n\n```csharp\n// Creating an instance from an integer\nvar number = new BigDecimal(1234567890);\n\n// Creating an instance from a long integer\nvar number = new BigDecimal(1234567890L);\n\n// Creating an instance from a double\nvar number = new BigDecimal(1234567890.123456);\n```\n\nor rather from a string:\n\n```csharp\n// Parsing a string to a big decimal\nvar number = BigDecimal.Parse(\"1234567890\");\n```\n\n## Contributing\n\nIf you want to contribute to the development of this library, you can fork the repository and submit a pull request with your changes.\n\nPlease 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.\n\n### Future Development\n\n#### BigInteger Porting\n\nWhen 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.\n\nNow 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.\n\n#### Performance Benchmarks\n\nWe 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.\n\n## License\n\nThe library is released under the terms of the [Apache License 2.0](LICENSE), and it is provided as-is without any warranty or support.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeveel%2Fdeveel-math","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeveel%2Fdeveel-math","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeveel%2Fdeveel-math/lists"}