Excellent document!  Here are my comments, tabbed text is how I would
have written it:

On Thu, Nov 28, 2002 at 01:54:31AM +0100, Angel Faus wrote:
> The left portion of the C<e> is the coefficient, and the right is the
> exponent,

        The portion to the left of the C<e> is the coefficient, and the
        portion to the right is the exponent

>   3#1210112               # tertiary 

Though they are similar, I think "ternary" is the right word here.
Tertiary is third in rank: primary, secondary, tertiary.
Ternary is three in number: unary, binary, ternary.

> (See the section "Number to String Conversion" for information
> about how to costumize the string representation of numbers)
               ^^^^^^^^^ 
               customize

Although, "costumize" fires off all sorts of interesting ideas about
masked numbers.  :-)

> When the base is greater than 10, there is a need to 
> represent digits that are greater than 9. This can be done in
> two ways:
> 
> =over
> 
> =item *
> 
> Alphanumeric digits: Following the common practice,

s/the//

> perl will interpret the A letter as the digit 10, the B
> letter as digit 11, and so on.

        perl will interpret the letter C<A> as the digit 10, the letter
        C<B> as the digit 11, and so on until the letter C<Z>.

>   16:1e3a5              # the same 

s/:/#/

> This won't work for bases greater than 36, so we
> have too:

s/have too/have to use/

> Colon Form: You can also write each digit in its own
> decimal representation, and separate digits using the C<:>
> character.

        Colon Form: You can also write each digit as a decimal
        representation of that digit and separate ...

> 
> 
> =section *** Bin/Hex/Oct shorthands
> 
> Since writing in binary, hexadecimal and octal is a 

        Since writing binary, octal, and hexadecimal numbers is a 

> can use this to break up a long number into a more readable
> forms.

s/forms/form/

> digits, not between any other characters that is allowed 

s/is/are/

>  123_456_000.000     # decimal
>  2#0110_1000         # binary
>  16#FF_88_EE         # hexidecimal
>  1312512.25          # decimal 
>  1_312_512.25        # the same one
>  
>  _2_3_4____5___6     # error
>  1.434_e_45          # erro: this 'e' is not a digit.

I think there should be some text here that points out the
difference between the colon form (CF) and the underscored form
(UF). Here's a stab:

        Note that in the CF the individual digits are represented by
        decimal numbers whereas in the UF, the underscore separates
        digits in whatever representation you have chosen to use.
        For instance:

                16#1a2b3c
                16#1a_2b_3c             # same
                16#1_a_2_b_3_c          # same
                16#1:10:2:11:3:12       # same

        Thus, there is only one way to represent a number in a given
        radix using the CF, while there may be many ways to represent
        that number using the UF depending on where you wish to place
        the underscores.

BTW, is 256#2_3_4:255 legal?  I vote no.

> In boolean context (see "Boolean Context") C<NaN> always
> evaluates to false so.

s/ so//

> standard, which means that it in general it will do 

s/it in/in/

> This can produce undesired effects when working with
> custom types of numbers, such as variables typed
> as C<Int>.
> 
> For example:
> 
>  my Int $i is bigint = 777_666_555_444_333_222_111;
>  print $i;  # prints 77766655544433300000

[ other bigint stuff elided ]

I was under the impression that Perl6 would support bigints natively
such that when it ran across numbers like 777_666_555_444_333_222_111,
it would automatically promote them to bigints (unless you told it
otherwise)  But maybe that's just a dream I had.

-Scott
-- 
Jonathan Scott Duff
[EMAIL PROTECTED]

Reply via email to