bugDotGNU Portable.NET - Bugs: bug #10483, Modulus (%) borked

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #10483: Modulus (%) borked

Submitted by:  Carl-Adam Brengesjo <ptah>
Submitted on:  Thu 23 Sep 2004 04:13:50 PM UTC  
 
Category: NoneSeverity: 4 - Important
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Thu 23 Sep 2004 10:26:21 PM UTC, comment #2:

"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.

Rhys Weatherley <rweather>
Project Administrator
Thu 23 Sep 2004 05:44:41 PM UTC, comment #1:

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.

Gopal.V <t3rmin4t0r>
Project Administrator
Thu 23 Sep 2004 04:13:50 PM UTC, 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

Carl-Adam Brengesjo <ptah>
Project Member

 

Attached Files
file #1794:  md_x86.c.hack added by t3rmin4t0r (424B - application/octet-stream - md_x86.c debug hacks)
file #1793:  float.log added by t3rmin4t0r (5KiB - text/x-log - gdb log)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 4 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Thu 23 Sep 2004 10:26:21 PM UTCrweatherStatusNone=>Fixed
  Open/ClosedOpen=>Closed
Thu 23 Sep 2004 05:45:41 PM UTCt3rmin4t0rAttached File-=>Added md_x86.c.hack, #1699
Thu 23 Sep 2004 05:44:41 PM UTCt3rmin4t0rAttached File-=>Added float.log, #1698

Back to the top


Powered by Savane 3.1-cleanup1