[IronPython] Road to IronPython 2.7 (update)

Tristan Zajonc tristanz at gmail.com
Tue Feb 22 21:17:33 CET 2011


Looks like a Mono Bug.  The following code prints both "small enough" and
"big enough", which not true.

var a =
System.Numerics.BigInteger.Parse("143098242404177361603877621312831893704");
Console.WriteLine(a);
if (a < System.Int32.MaxValue) {
Console.WriteLine("Small enough");
}
if (a > System.Int32.MinValue) {
Console.WriteLine("Big enough");
}

I will report this to Mono team.

Tristan

On Tue, Feb 22, 2011 at 2:09 PM, Jeff Hardy <jdhardy at gmail.com> wrote:

> On Tue, Feb 22, 2011 at 11:55 AM, Tristan Zajonc <tristanz at gmail.com>
> wrote:
> > It appears to be because int is a very large long.  This is probably the
> > core issue:
> > In IronPython:
> >>>> a=143098242404177361603877621312831893704
> > Traceback (most recent call last):
> > OverflowError: Number overflow.
> >>>> a=143098242404177361603877621312831893704L
> >>>> a
> > 143098242404177361603877621312831893704L
>
> This works for me on .NET, so it's almost certainly a Mono bug. Can
> you reproduce it in a C# program?
>
> Doesn't mean we can't work around it, though, but I'd prefer not too.
> I've bumped it to high priority; one way or another it'll get fixed
> for 2.7.
>
> - Jeff
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20110222/50291764/attachment.html>


More information about the Ironpython-users mailing list