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

--- Comment #0 from Brandon Lyon <> 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.;

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to