=begin pod

=head1 Rational

    role Rational[::NuT, ::DenomT] does Real { ... }

C<Rational> is the common role for numbers that are stored as pairs of
numerator and denominator. It is parameterized by the types of the numerator
and denominator.

Built into Perl 6 are L<Rat> and L<FatRat>, which both do the C<Rational> role.

=head2 methods

=head3 new

    method new(NuT:D $numerator, DenomT:D $denominator) returns Rational:D

Creates a new rational object from numerator and denominator.

=head3 numerator

    method numerator(Rational:D:) returns NuT:D

Returns the numerator.

=head3 denominator

    method denominator(Rational:D:) returns DenomT:D

Returns the denominator.

=head3 nude

    method nude(Rational:D:) returns Positional

Returns a list of the numerator and denominator.

=head3 norm

    method norm(Rational:D:) returns Rational:D

Returns a normalized Rational object, ie with positive denominator, and
numerator and denominator coprime.

=end pod
