Description
BigRational is a rational number class for arbitrary-precision arithmetic.
There are no practical limits to the precision except the ones implied by the available memory.
In difference to the usual implementations of such a class, the new system offers
a significantly better performance and better memory usage.
This is mainly due to the advantages of a stack machine, which minimizes the need for memory allocations and copies,
and which allows to apply more efficient numerical algorithms.
The way it works and the Api Documentation
is available on GitHub-Pages.
As ultimate speed test compared to an ordinary BigRational class based on BigInteger, here the Mandelbrot set.
This example contains everything, all basic numeric operations, small and big numbers, numbers with few and with many digits, iterations, threading and is generally very computationally intensive.
It shows that the new system is many times faster than what is even possible with conventional technique.
Theoretically, the
BigRational alternatives and similar packages
Based on the "Caching" category.
Alternatively, view RationalNumerics alternatives based on common mentions on social networks and blogs.
-
Electron.NET
:electron: Build cross platform desktop apps with ASP.NET Core (Razor Pages, MVC, Blazor). -
CacheManager
CacheManager is an open source caching abstraction layer for .NET written in C#. It supports various cache providers and implements many advanced features. -
Akavache
An asynchronous, persistent key-value store created for writing desktop and mobile applications, based on SQLite3. Akavache is great for both storing important data as well as cached local data that expires. -
FusionCache
FusionCache is an easy to use, fast and robust hybrid cache with advanced resiliency features. -
EasyCaching
:boom: EasyCaching is an open source caching library that contains basic usages and some advanced usages of caching which can help us to handle caching more easier! -
Lazy Cache
An easy to use thread safe in-memory caching service with a simple developer friendly API for c# -
Shiny for Microsoft Application UI (MAUI), Xamarin Forms, Xamarin Native, & Blazor WebAssembly
.NET Framework for Backgrounding & Device Hardware Services (iOS, Android, & Catalyst) -
CacheCow
An implementation of HTTP Caching in .NET Core and 4.5.2+ for both the client and the server -
SharpRepository
C# Generic Repository for use with Entity Framework, RavenDB and more with built-in caching options. -
FastCache
7x-10x faster alternative to MemoryCache. A high-performance, lighweight (8KB dll) and thread-safe memory cache for .NET. -
Green Donut
DISCONTINUED. Green Donut is a port of facebook's DataLoader utility, written in C# for .NET Core and .NET Framework
CodeRabbit: AI Code Reviews for Developers

* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of BigRational or a related project?
README
BigRational - a novel rational number class.
BigRational is a rational number class for arbitrary-precision arithmetic.
There are no practical limits to the precision except the ones implied by the available memory.
In difference to the usual implementations of such a class, the new system offers
a significantly better performance and better memory usage.
This is mainly due to the advantages of a stack machine, which minimizes the need for memory allocations and copies,
and which allows to apply more efficient numerical algorithms.
The way it works and the Api Documentation
is available on GitHub-Pages.
As ultimate speed test compared to an ordinary BigRational class based on BigInteger, here the Mandelbrot set.
This example contains everything, all basic numeric operations, small and big numbers, numbers with few and with many digits, iterations, threading and is generally very computationally intensive.
It shows that the new system is many times faster than what is even possible with conventional technique.
Theoretically, the increase in performance should be around factor of 10, which is confirmed by the test.
By zooming deeper into the Mandelbrot set, a factor of 20 and more is possible due to the massive memory garbage the old system implies.
[mandel1](docs/images/mandel1.png)
The second example is an ultimate test for the stacking machine.
The Tesselator uses its own instance of a BigRational.CPU stack machine, which is also used as a vertex buffer. Almost all CPU instructions are in use.
In this form no further memory allocations are necessary at runtime and the tessellation can never fail what is a big problem for any floating-point tessellation algorithm.
[tess1](docs/images/tess1.png)
The third example is an intensive test for a set of 3D vector types and algorithms
based on BigRational and BigRational.CPU arithmetic.
All 3D mesh calculations, polygon tessellations, CSG, etc. are done in real time at animation time.
[polyhedron1](docs/images/polyhedron1.png)
The fourth example, a calculator, is intended for testing BigRational's high-level functions API.
No problem to calculate with thousands of decimal digits.
Precisission, string formattings and speed for the several functions can be checked.
[calc1](docs/images/calc1.png)
The Benchmarks are currently under construction.
The bottle-nack for rational arbitrary arithmetic is the integer multiplication and for the normalization the GCD function and the integer division.
The first benchmarks showing that the BigRational calculation core is aprximatly 15% faster then the equivalent functions in System.Numerics.BigInteger.
With other words, using BigRagtional for pure integer arithmetics can improve the performance, and together by using the CPU dramatic.
BigInteger in NET 7 will use Spans more stack allocs and shared buffers.
The benchmarks made with NET 7 preview versions are showing that this reduces a little bit the memory pressure
but further degreads the performance especialliy for big numbers.
[banch1](docs/images/benchmarks1.png)
More detailed benchmarks coming soon.
- How it works and how to use it: https://c-ohle.github.io/RationalNumerics
- Api Documentation: https://c-ohle.github.io/RationalNumerics/api/System.Numerics.html
- NuGet Package: https://www.nuget.org/packages/BigRational
- State and discussion .NET7 version