[Issue 2697] [DMC too] Cast of float function return to ulong or uint gives bogus value

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Aug 4 01:14:49 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=2697


Lars T. Kyllingstad <bugzilla at kyllingen.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla at kyllingen.net




--- Comment #5 from Lars T. Kyllingstad <bugzilla at kyllingen.net>  2009-08-04 01:14:48 PDT ---
This is the output I get from running Stewart's program with DMD 2.031 on Linux
(64-bit, although since DMD is 32-bit it probably doesn't matter):

float:  5.000000
ulong:  9223372036854775808
long:   5
uint:   5
int:    5
ushort: 5
short:  5
ubyte:  5
byte:   5
float:  5.000000
ulong:  5
long:   5
uint:   5
int:    5
ushort: 5
short:  5
ubyte:  5
byte:   5

As you suspected, float->uint works, while float->ulong fails.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list