Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #70600] [BUG] Rakudo gets confused when the exponent in scientific notation is large enough

0 views
Skip to first unread message

Carl Mäsak

unread,
Nov 17, 2009, 11:32:14 AM11/17/09
to bugs-bi...@netlabs.develooper.com
# New Ticket Created by "Carl Mäsak"
# Please include the string: [perl #70600]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=70600 >


<diakopter> rakudo: say 0e99999999999 # masak
<p6eval> rakudo 7347ec: undefined identifier 'NaN' [...]
<moritz_> ng: say 0e99999999999
<p6eval> ng 94fa72: error:imcc:syntax error, unexpected IDENTIFIER,
expecting COMMA or ')' ('NaN')
<diakopter> whoa
* masak submits rakudobug

Will Coleda via RT

unread,
Aug 18, 2010, 12:30:03 AM8/18/10
to perl6-c...@perl.org
On Tue Nov 17 08:32:14 2009, masak wrote:
> <diakopter> rakudo: say 0e99999999999 # masak
> <p6eval> rakudo 7347ec: undefined identifier 'NaN' [...]
> <moritz_> ng: say 0e99999999999
> <p6eval> ng 94fa72: error:imcc:syntax error, unexpected IDENTIFIER,
> expecting COMMA or ')' ('NaN')
> <diakopter> whoa
> * masak submits rakudobug

00:29 <[Coke]> rakudo: say 0e99999999999
00:29 <p6eval> rakudo 67778a: OUTPUT«NaN␤»

That looks better. assigning to moritz++ for testification.


--
Will "Coke" Coleda

Nicholas Clark

unread,
Aug 18, 2010, 12:41:08 PM8/18/10
to Will Coleda via RT, perl6-c...@perl.org
On Tue, Aug 17, 2010 at 09:30:03PM -0700, Will Coleda via RT wrote:
> On Tue Nov 17 08:32:14 2009, masak wrote:
> > <diakopter> rakudo: say 0e99999999999 # masak
> > <p6eval> rakudo 7347ec: undefined identifier 'NaN' [...]
> > <moritz_> ng: say 0e99999999999
> > <p6eval> ng 94fa72: error:imcc:syntax error, unexpected IDENTIFIER,
> > expecting COMMA or ')' ('NaN')
> > <diakopter> whoa
> > * masak submits rakudobug
>
> 00:29 <[Coke]> rakudo: say 0e99999999999
> 00:29 <p6eval> rakudo 67778a: OUTPUT«NaN???»

>
> That looks better. assigning to moritz++ for testification.

NaN?

Perl 5 thinks:

$ perl -le 'print 0e99999999999'
0
$ perl -le 'print 1e99999999999'
inf

and I find its answers more pleasing.

Nicholas Clark

Will Coleda

unread,
Aug 18, 2010, 12:44:41 PM8/18/10
to Will Coleda via RT, perl6-c...@perl.org

Whoops, I meant better in that it actually returned a value instead of
vomiting. =-)

Agreed that the actual value is wrong.

--
Will "Coke" Coleda

0 new messages