# Rationals 2.0.0

This package has a SemVer 2.0.0 package version: 2.0.0+build.86.
There is a newer version of this package available.
See the version list below for details.
`dotnet add package Rationals --version 2.0.0`
`NuGet\Install-Package Rationals -Version 2.0.0`
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
`<PackageReference Include="Rationals" Version="2.0.0" />`
For projects that support PackageReference, copy this XML node into the project file to reference the package.
`paket add Rationals --version 2.0.0`
`#r "nuget: Rationals, 2.0.0"`
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
```// Install Rationals as a Cake Addin
#addin nuget:?package=Rationals&version=2.0.0

// Install Rationals as a Cake Tool
#tool nuget:?package=Rationals&version=2.0.0```

Implementation of rational number arithmetic for .NET with arbitrary precision.

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)
- separate whole and fractional part - any rational number can be separated into a whole part (integer quotient aka result of integer division) and fractional part (reminder of the integral division aka result of modulo operation)
- comparison &amp; equality
- multiple formatting options - ToString("C") (canonical form), ToString("W") (whole + fractional part), or normal fraction format
- continued fraction expansion - expand rational numbers to continued fraction (sequence of coefficients), construct rational numbers from sequence of continued fraction coefficients
- rational number approximation - approximate floating point numbers (decimal, double, float) as rational numbers with customizable tolerance

Example usage:

Rational left = (Rational) 1 / 2;

Rational right = (Rational) 1 / 4;

Rational sum = left + right; // equals to: 3 / 4

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.
.NET Core netcoreapp1.0 was computed.  netcoreapp1.1 was computed.  netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed.
.NET Standard netstandard1.3 is compatible.  netstandard1.4 was computed.  netstandard1.5 was computed.  netstandard1.6 was computed.  netstandard2.0 was computed.  netstandard2.1 was computed.
.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.
MonoAndroid monoandroid was computed.
MonoMac monomac was computed.
MonoTouch monotouch was computed.
Tizen tizen30 was computed.  tizen40 was computed.  tizen60 was computed.
Universal Windows Platform uap was computed.  uap10.0 was computed.
Xamarin.iOS xamarinios was computed.
Xamarin.Mac xamarinmac was computed.
Xamarin.TVOS xamarintvos was computed.
Xamarin.WatchOS xamarinwatchos was computed.
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
• #### .NETFramework 4.0

• No dependencies.

### NuGet packages (4)

Showing the top 4 NuGet packages that depend on Rationals:

Package Downloads
Peachpie.Library

Peachpie PHP language library functions.

CryptoExchangeClient

Clients for multiple cryptocurrency exchanges. All clients have a shared interface for common actions.

DelSquared.Radicals

.NET implementation of radical expressions enabling radical expression arithmetic.

DoodleDigits.Core

Math library powering Doodle Digits. Takes a string input and returns a number of results.

### 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
2.3.0 3,086 11/19/2023
2.2.0 566 10/14/2023
2.1.0 4,070 3/27/2023
2.0.0 35,143 8/21/2021
1.4.1 2,717 7/6/2021
1.4.0 199,178 12/28/2020
1.3.3 409,218 1/15/2019
1.3.2 55,197 9/15/2018
1.3.1 43,264 11/18/2017
1.3.0 1,447 11/11/2017
1.2.1 1,555 3/11/2017
1.2.0 3,190 7/2/2016
1.1.1 1,302 7/2/2016
1.1.0 1,306 7/2/2016
1.0.0 1,935 11/1/2014