MPL11
 All Classes Namespaces Files Typedefs Macros Groups Pages
Rational

Exact rational number represented as a ratio of two integers. More...

Detailed Description

Exact rational number represented as a ratio of two integers.

Instance of

Comparable, Orderable, Monoid, Group, Ring and Field.

Todo:
  • Write unit tests for the provided instances.
  • Consider checking for overflows and reducing the fraction after doing computations.
  • Consider instantiating IntegralDomain.