bugDotGNU Portable.NET - Bugs: bug #14645, Wrong result when casting a double...

 
 

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

bug #14645: Wrong result when casting a double to Int32

Submitter:  Peter Flaig <fliege>
Submitted:  Mon 26 Sep 2005 11:32:13 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Mon 26 Sep 2005 11:32:13 AM UTC, original submission:  

double d = 314d/2574;
Console.WriteLine((int)(d * 2574));

The ouput is:
313

but it has to be: 314

Peter Flaig <fliege>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #3052:  ReturnInt.zip added by fliege (2KiB - application/x-zip-compressed)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follows 1 latest change.

Date Changed by Updated Field Previous Value => Replaced by
2005-09-26 fliege Attached File- Added ReturnInt.zip, #3003

Back to the top

Powered by Savane 3.13-f8d8.
Corresponding source code