[Mono-dev] System.MathTest.TestIEEERemainder fails

nataraj.ramaswamy at wipro.com nataraj.ramaswamy at wipro.com
Tue Jun 10 03:22:38 EDT 2008


Hi,
We have been able to successfully build Mono on Solaris 7 sparc (32
bit).
 
When we tried to execute the Class Library test suites, some of the test
cases were failing.
 
We need your expert inputs/suggestions on the following failure:
 
Under mcs/class/corlib, MonoTests.System.MathTest.TestIEEERemainder
fails with the error message:
Negative Dividend expected:<-9223372036854775808>  but was:<128>
  at MonoTests.System.MathTest.TestIEEERemainder () [0x000bf] in
/mono_sol7/mono-1.9/mcs/class/corlib/Test/System/MathTest.cs:414 
  at (wrapper managed-to-native)
System.Reflection.MonoMethod:InternalInvoke (object,object[])
  at System.Reflection.MonoMethod.Invoke (System.Object obj,
BindingFlags invokeAttr, System.Reflection.Binder binder,
System.Object[] parameters, System.Globalization.CultureInfo culture)
[0x0003f] in
/mono_sol7/mono-1.9/mcs/class/corlib/System.Reflection/MonoMethod.cs:149

 
On analysing further, it is observed that:
- In System/Math.cs, IEEERemainder uses InternalInt64BitsToDouble.
Changing this to Int64BitsToDouble gave the expected result and the test
case passed.
- InternalInt64BitsToDouble() uses SwappableToDouble() under
System/BitConverter.cs . Here it gets into (!IsLittleEndian) which fills
the value in the big endian (reverse) order whereas Int64BitsToDouble
uses ToDouble() which doesnot  perform this conversion based on
endianness (!IsLittleEndian).
 
We would like to know your valuable inputs on how to  address this issue
for Solaris 7 sparc.
Please let us know whether it would be  correct to use Int64BitsToDouble
instead of InternalInt64BitsToDouble (conditionally built for Solaris 7
sparc). 
 
Thanks & regards,
Nataraj
 
 
 
 

Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. 

www.wipro.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20080610/a827739b/attachment.html 


More information about the Mono-devel-list mailing list