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 <jdha...@gmail.com> wrote: > On Tue, Feb 22, 2011 at 11:55 AM, Tristan Zajonc <trist...@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 >
_______________________________________________ Users mailing list Users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com