[Issue 4765] std.math.modf always returns 0

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Nov 15 13:12:13 PST 2011


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


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

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


--- Comment #3 from Lars T. Kyllingstad <bugzilla at kyllingen.net> 2011-11-15 13:11:25 PST ---
Actually, I think the documentation is wrong here.  The C function modfl(), to
which std.math.modf() forwards, does not calculate the remainder of an integer
division.  Rather it splits a number into an integer part and a fractional part
(e.g. it splits 3.14 into 3 and 0.14).

The C function to calculate the remainder is fmod(), which doesn't seem to have
a counterpart in std.math.

-- 
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