Rationals 1.0.0
dotnet add package Rationals --version 1.0.0
NuGet\Install-Package Rationals -Version 1.0.0
<PackageReference Include="Rationals" Version="1.0.0" />
paket add Rationals --version 1.0.0
#r "nuget: Rationals, 1.0.0"
// Install Rationals as a Cake Addin #addin nuget:?package=Rationals&version=1.0.0 // Install Rationals as a Cake Tool #tool nuget:?package=Rationals&version=1.0.0
Implementation of rational number arithmetics for .NET
Supported features:
- implicit conversions - rationals integrate seamlessly with other number types
- unlimited precision - rationals use BigInteger inside
- canonical form - each rational can have its canonical form (irreducible fraction where denominator is always positive)
- comparison & equality
- multiple formatting options - ToString("C") (canonical form), ToString("W") (whole + fractional part), or normal fraction format
Example usage:
Rational left = (Rational) 1 / 2;
Rational right = (Rational) 1 / 4;
Rational sum = left + right; // equals to: 3 / 4
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net40 is compatible. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
This package has no dependencies.
GitHub repositories (2)
Showing the top 2 popular GitHub repositories that depend on Rationals:
Repository | Stars |
---|---|
peachpiecompiler/peachpie
PeachPie - the PHP compiler and runtime for .NET and .NET Core
|
|
AnthonyLloyd/CsCheck
Random testing library for C#
|
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 427 | 11/1/2014 |