=begin pod

=head1 Real

    role Real does Numeric { ... }

Common role for non-Complex numbers.

=head2 Methods

=head3 Rat

    method Rat(Real:D: Real $epsilon = 1e-6)

Converts the number to a C<Rat> with the precision C<$epsilon>.

=head3 rand

    method rand(Real:D:)

Returns a pseudo-random number between zero and the number.

=head3 sign

    method sign(Real:D:)

Returns C<-1> if the number is negative, C<0> if it is zero and C<1>
otherwise.

=head3 round

    method round(Real:D: $scale = 1)

Rounds the number to scale C<$scale>. If C<$scale> is 1, rounds to an
integer. If scale is C<0.1>, rounds to one digit after the comma etc.

=head3 floor

    method floor(Real:D) returns Int:D

Return the largest integer not greater than the number.

=head3 ceiling

    method ceiling(Real:D) returns Int:D

Returns the smallest integer not less than the number.

=head3 truncate

    method truncate(Real:D) returns Int:D

Rounds the number towards zero.

=head3 base

    method base(Real:D: Int:D $base where 2..36) returns Str:D

Converts the number to a string, using C<$base> as base. For C<$base> larger
than ten, capital latin letters are used.

    255.base(16)    # 'FF'

=end pod
