http://d.puremagic.com/issues/show_bug.cgi?id=9742
Summary: std.math.floor returns 0 for any value x > -1 and x <
0
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: regression
Priority: P2
Component: Phobos
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Benjamin Thaut <[email protected]> 2013-03-17 11:39:26
PDT ---
The documentation says that std.math.floor
Returns the value of x rounded downward to the next integer (toward negative
infinity).
But it returns 0 for any value x > -1 and x < 0. This used to work correctly in
earlier versions of phobos.
Repro case:
import std.math;
import core.stdc.stdio;
void main(string[] args)
{
assert(std.math.floor(-0.002f) == -1.0f);
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------