Re: Numeric Literals (Summary)

[email protected] (Michael Lazzaro) Fri, 15 Nov 2002 11:05:16 -0800
Newsgroups perl.perl6.documentation
Message-ID <[email protected]>
On Friday, November 15, 2002, at 10:51  AM, Dave Whipp wrote:
> "Michael Lazzaro" <[email protected]> wrote
>>> 1.5e1 == 15
>>> 16:1.5e1 != (1 + 5/16) * 16
>>
>> Due to ambiguities, the proposal to allow floating point in bases 
>> other
>> than 10 is therefore squished.  If anyone still wants it, we can ask
>> the design team to provide a final ruling.
>
> So what about
>
> 10:1.5
>
> is that dotted decimal (i.e. ==15) or a float ( == 1.5)?
>
> Both answers feel wrong to me.

I suppose the most consistent thing to do is say it's the dotted form, 
since that's what it would be in every other radix.

Presumably if you went to the trouble of specifying the "10", that's 
the behavior you're looking for, since otherwise you couldn't get 
base10 dotted (10:1.2.3.4) at all.

So no floating point in explicit radix at all, even if the radix is 
explicitly 10.  If you want float, specify it in float/exponential 
notation.

MikeL