[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pnet-developers] [bugs #10483] Modulus (%) borked
From: |
Rhys Weatherley |
Subject: |
[Pnet-developers] [bugs #10483] Modulus (%) borked |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826 |
This mail is an automated notification from the bugs tracker
of the project: DotGNU Portable.NET.
/**************************************************************************/
[bugs #10483] Latest Modifications:
Changes by:
Rhys Weatherley <address@hidden>
'Date:
Thu 09/23/2004 at 22:26 (GMT)
What | Removed | Added
---------------------------------------------------------------------------
Resolution | None | Fixed
Status | Open | Closed
------------------ Additional Follow-up Comments ----------------------------
"fprem" is what should be used in any case, as I discovered
in libjit recently. I copied "fprem1" from an older version
of Mono a long time ago, and they must have gotten it wrong.
They have since fixed it, but I didn't notice their fix.
Fix committed to CVS - 24 Sep 2004.
/**************************************************************************/
[bugs #10483] Full Item Snapshot:
URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=10483>
Project: DotGNU Portable.NET
Submitted by: Carl-Adam Brengesjo
On: Thu 09/23/2004 at 16:13
Category: None
Severity: 7 - Major
Item Group: None
Resolution: Fixed
Privacy: Public
Assigned to: None
Status: Closed
Summary: Modulus (%) borked
Original Submission: This is is really borked operation...
A simple mod operation of 3 and 2 results in -1 !!
test.cs:
using System;
class Foo
{
static void Main()
{
Double x1 = 3, x2 = 2, x3 = x1 % x2;
Console.WriteLine("x3 = {0} = {1} % {2}", x3, x1, x2);
}
}
pnet output:
x3 = -1 = 3 % 2
expected:
x3 = 1 = 3 % 2
Follow-up Comments
------------------
-------------------------------------------------------
Date: Thu 09/23/2004 at 22:26 By: Rhys Weatherley <rweather>
"fprem" is what should be used in any case, as I discovered
in libjit recently. I copied "fprem1" from an older version
of Mono a long time ago, and they must have gotten it wrong.
They have since fixed it, but I didn't notice their fix.
Fix committed to CVS - 24 Sep 2004.
-------------------------------------------------------
Date: Thu 09/23/2004 at 17:44 By: Gopal.V <t3rmin4t0r>
I'm attaching my debug results and strangely this looks like a CPU bug ?.
See the float.log for the gdb logs which are clearly strange.
and the md_x86.c.hack for the changes need to start debugging
this problem
Using fprem instead of the IEEE fprem1 fixed the issue, but it's a sad day when
FREM doesn't behave like IEEE float specs.
File Attachments
-------------------
-------------------------------------------------------
Date: Thu 09/23/2004 at 17:45 Name: md_x86.c.hack Size: 424B By: t3rmin4t0r
md_x86.c debug hacks
http://savannah.gnu.org/bugs/download.php?item_id=10483&item_file_id=1699
-------------------------------------------------------
Date: Thu 09/23/2004 at 17:44 Name: float.log Size: 4.81KB By: t3rmin4t0r
gdb log
http://savannah.gnu.org/bugs/download.php?item_id=10483&item_file_id=1698
For detailed info, follow this link:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=10483>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/