Rationals 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

There is a newer version of this package available.
See the version list below for details.
Install-Package Rationals -Version 1.0.0
dotnet add package Rationals --version 1.0.0
paket add Rationals --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Dependencies

This package has no dependencies.

Version History

Version Downloads Last updated
1.3.1 2,368 11/18/2017
1.3.0 138 11/11/2017
1.2.1 587 3/11/2017
1.2.0 2,076 7/2/2016
1.1.1 225 7/2/2016
1.1.0 224 7/2/2016
1.0.0 (current) 682 11/1/2014
Show less