Casts from unsigned integer to double result in incorrect values.
Steps to reproduce: Start Mono shell (csharp).
pi@raspberrypi ~ $ csharp
Mono C# Shell, type "help;" for help
Enter statements below.
csharp> uint u = 10;
csharp> double d = u;
csharp> double d = (double)u;
(the same occurs in actual (compiled) csharp programs.)
Actual results: unsigned integer 10 is castet to a negative double value
Expected results: unsigned interger 10 should be castet to double value 10.0
Hardware platform: ARM (RaspberryPi)
Mono Version: 220.127.116.11 (Debian 18.104.22.168-5) in Raspbian (Wheezy)
Linux kernel: Linux raspberrypi 3.2.27+ #160 PREEMPT Mon Sep 17 23:18:42 BST 2012 armv6l GNU/Linux
Does not occur on other hardware platforms (x86, x86-64) with same Mono version
I can't reproduce this using mono master, whats the output of mono --version ?
pi@raspberrypi ~ $ mono --version
Mono JIT compiler version 22.214.171.124 (Debian 126.96.36.199-5)
Copyright (C) 2002-2011 Novell, Inc, Xamarin, Inc and Contributors. www.mono-project.com
LLVM: supported, not enabled.
GC: Included Boehm (with typed GC and Parallel Mark)
Probably a dup of
Yes, it seems so. The problem does not occur on Debian Wheezy with softfp.
*** This bug has been marked as a duplicate of bug 7938 ***
Notice (2018-05-21): bugzilla.xamarin.com will be
switching to read-only mode on Thursday, 2018-05-25 22:00 UTC.
Please join us on
Visual Studio Developer Community and
GitHub to continue tracking
issues. Bugzilla will remain available for reference in read-only mode.
We will continue to work on open Bugzilla bugs and copy them to the new
locations as needed for follow-up. The See Also field
on each Bugzilla bug will be updated with a link to its new location
After Bugzilla is read-only, if you have new information to add for a
bug that does not yet have a matching issue on Developer Community or
GitHub, you can create a follow-up issue in the new location. Copy and
paste the title and description from this bug, and then add your new
details. You can get a pre-formatted version of the title and
In special cases you might also want the comments:
Our sincere thanks to everyone who has contributed on this bug tracker
over the years. Thanks also for your understanding as we make these
adjustments and improvements for the future.