<commit_before>![Rationals logo](https://raw.githubusercontent.com/tompazourek/Rationals/master/assets/logo_64.png) Rationals .NET
==============

*Implementation of rational number arithmetics for .NET.*

[![Build status](https://ci.appveyor.com/api/projects/status/8w3d71q8fr65gntb)](https://ci.appveyor.com/project/tompazourek/rationals)

```csharp
Rational left = (Rational) 1 / 2;
Rational right = (Rational) 1 / 4;

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

Download
--------

Binaries of the last build can be downloaded on the [AppVeyor CI page of the project](https://ci.appveyor.com/project/tompazourek/rationals/build/artifacts).

The library is also [published on NuGet.org](https://www.nuget.org/packages/Rationals/), install using:

```
PM> Install-Package Rationals
```


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<commit_msg>Updated readme to include whole/fractional part support.<commit_after>![Rationals logo](https://raw.githubusercontent.com/tompazourek/Rationals/master/assets/logo_64.png) Rationals .NET
==============

*Implementation of rational number arithmetics for .NET.*

[![Build status](https://ci.appveyor.com/api/projects/status/8w3d71q8fr65gntb)](https://ci.appveyor.com/project/tompazourek/rationals)

```csharp
Rational left = (Rational) 1 / 2;
Rational right = (Rational) 1 / 4;

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

Download
--------

Binaries of the last build can be downloaded on the [AppVeyor CI page of the project](https://ci.appveyor.com/project/tompazourek/rationals/build/artifacts).

The library is also [published on NuGet.org](https://www.nuget.org/packages/Rationals/), install using:

```
PM> Install-Package Rationals
```


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**
- **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)
- **multiple formatting options** - `ToString("C")` (canonical form), `ToString("W")` (whole + fractional part), or normal fraction format
{'fraction_non_alphanumeric': 0.14726507713884993, 'fraction_numerical': 0.010518934081346423, 'mean_word_length': 4.572265625, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 10, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3120298', 'n_tokens_mistral': 892, 'n_tokens_neox': 817, 'n_words': 260}