Here is an update.
There is no differences with the function
System.Math.Log10 under any operating system.
The problem is with the casting of the datatype double
and value Infinite to datatype int.
E.g.
double myValue = System.Math.Log10(0d);
// myValue = Infinite
int myIntValue = (int)myValue]
// myIntValue = -2147483648 under Framework 1.1 in
Windows XP Pro
// myIntValue = 0 under Framework 1.1 in Windows NT SP6a
// myIntValue = 3622256 under Framework 2.0 in Windows XP
Pro.
So as you can see there is a bug with casting Infinite to
int.
I've raised it with Microsoft.
Thanks,
-----Original Message-----
In Windows XP
System.Math.Log10(0) returns -2147483648
In Windows NT
System.Math.Log10(0) returns 0.
Does anyone know why?
Thanks,
.