digitalmars.D.bugs - [Issue 4691] New: Incorrect comparison of double and long
- d-bugmail puremagic.com (32/32) Aug 20 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4691
- d-bugmail puremagic.com (15/15) Aug 20 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4691
- d-bugmail puremagic.com (11/11) Aug 21 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4691
http://d.puremagic.com/issues/show_bug.cgi?id=4691
Summary: Incorrect comparison of double and long
Product: D
Version: D1 & D2
Platform: Other
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody puremagic.com
ReportedBy: bugzilla digitalmars.com
--- Comment #0 from Walter Bright <bugzilla digitalmars.com> 2010-08-20
12:15:45 PDT ---
import std.c.stdio;
struct UN
{
double dd;
long ll;
}
string cmp( UN * pU )
{
return pU.dd >= pU.ll ? "OK" : "ERRROR";
}
int main()
{
static UN u = { 10.50, 10 };
printf( "%.*s\n", cmp( &u ) );
return 0;
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 20 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4691
bearophile_hugs eml.cc changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bearophile_hugs eml.cc
--- Comment #1 from bearophile_hugs eml.cc 2010-08-20 13:06:56 PDT ---
Reduced test case:
double d = 1.5;
long l = 1;
void main() {
assert(d >= l);
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 20 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4691
Walter Bright <bugzilla digitalmars.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #2 from Walter Bright <bugzilla digitalmars.com> 2010-08-21
16:51:55 PDT ---
http://www.dsource.org/projects/dmd/changeset/622
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 21 2010









d-bugmail puremagic.com 