[Issue 10187] New: Precision of floating-point returned values
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon May 27 23:54:52 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10187
Summary: Precision of floating-point returned values
Product: D
Version: D2
Platform: x86
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: thecybershadow at gmail.com
--- Comment #0 from Vladimir Panteleev <thecybershadow at gmail.com> 2013-05-28 09:54:51 EEST ---
real n = 6287.4;
float f() { return n; }
void main()
{
assert(f() == f());
}
The assert fails, presumably because one value is on the stack, and another is
in an FPU register.
Stumbled upon it while attempting:
allData.sort!((a, b) => a["!Price"].to!float() < b["!Price"].to!float())();
std.algorithm throws, because "Predicate for isSorted is not antisymmetric".
--
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