http://d.puremagic.com/issues/show_bug.cgi?id=4765
Summary: std.math.modf always returns 0 Product: D Version: D2 Platform: x86_64 OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: ether...@gmail.com --- Comment #0 from Brandon Lyon <ether...@gmail.com> 2010-08-29 19:31:16 PDT --- The following code should output "3" but instead outputs "0". This is because, regardless of the values sent to std.math.modf, the returned value is always 0. I've used many combinations of values, but the result is always the same: 0. At first I believed I was misusing the function and I noticed that the second parameter was taken as a ref, so I performed the function call and checked 'b', but it always stored the beginning value unchanged. import std.stdio; import std.math; void main () { real a = 9., b = 5.; writeln(modf(a,b)); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------