[Bug 38988] New: when using MS .net there are wrong results (but no errors)

wine-bugs at winehq.org wine-bugs at winehq.org
Wed Jul 29 04:57:45 CDT 2015


https://bugs.winehq.org/show_bug.cgi?id=38988

            Bug ID: 38988
           Summary: when using MS .net there are wrong results (but no
                    errors)
           Product: Wine
           Version: 1.6.2
          Hardware: x86-64
                OS: Linux
            Status: UNCONFIRMED
          Severity: major
          Priority: P2
         Component: -unknown
          Assignee: wine-bugs at winehq.org
          Reporter: mayth at arcor.de
      Distribution: ---

Created attachment 51943
  --> https://bugs.winehq.org/attachment.cgi?id=51943
executable showing the results of the code quoted above

The bug was detected on a system as follows:
* Linux Mint 17 64-bit
* Wine 1.6.2 with a 32-bit environment
* orginal Microsoft .net framework installed in Wine (irrelevant if V2 or V3.5
or V4, irrelevant if installed directly or using winetricks)

If a .net program written in C# and running on a system as described above uses
an explicit conversion from "decimal" data type to "float" data type, this
conversion sometimes gives wrong results. There is no error message at all, but
the result is completely wrong i.e. it is not just a matter of rounding.
However, the result is not always wrong, but only for certain numbers (see
below).

The same program executed on a Windows system or on a Linux system with Mono
works fine. Therefore, the program seems to call some functions within the
original MS .net framework which are not correctly executed by Wine.

The C# code which demonstrates the bug is as follows:

            // example #1
            decimal d = -0.594059405941m;
            float f = (float) d;
            Console.WriteLine ( "Value as decimal: " + d );
            Console.WriteLine ( "Value converted to float: " + f );
            // example #2
            d = 0.605321507761m;
            f = (float) d;
            Console.WriteLine ( "Value as decimal: " + d );
            Console.WriteLine ( "Value converted to float: " + f );

A compiled file is attached. Run it on a Windows system or on a Linux system
with Mono, and it works fine. Run it using Wine with the original MS .net
framework, and the bug will occur.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list