[Mono-list] Can there be a problem with System.Math.Max?
Felipe Almeida Lessa
felipe.lessa at gmail.com
Tue Jul 3 12:34:03 EDT 2007
On 7/3/07, Maser, Dan <Dan.Maser at inin.com> wrote:
> Prints -2147483647 when I'd expect it to print 100. Looking at the source
> code to Math.Max in class/corelib/System/Math.cs I don't see any problem,
> though. Can someone else verify this?
Don't have SVN here, but on mono 1.2.3.1 it's working fine.
$ cat a.cs
using System;
public class MainClass {
public static void Main() {
int a = 100;
int b = -2147483647;
Console.WriteLine("Math.Max({0}, {1}) is {2}", a, b,
Math.Max(a, b));
}
}
$ mcs a.cs
$ mono a.exe
Math.Max(100, -2147483647) is 100
$ mono --version
Mono JIT compiler version 1.2.3.1, (C) 2002-2006 Novell, Inc and
Contributors. www.mono-project.com
TLS: __thread
GC: Included Boehm (with typed GC)
SIGSEGV: normal
Architecture: x86
Disabled: none
--
Felipe.
More information about the Mono-list
mailing list