Summary: std.numeric.CustomFloat horribly broken
           Product: D
           Version: 2.036
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos

--- Comment #0 from David Simcha <> 2009-11-16 19:54:20 PST ---
Filing these as one bug report since they probably have the same underlying
cause (can't tell for sure since CustomFloat relies on BitFields, and debugging
string mixins that I didn't write myself is incredibly hard)

import std.stdio, std.numeric;

alias CustomFloat!(1, 13, 2) F;

void main() {
    F num = F(0.314);

Compile w/ -O -inline -release.  Result:  Compile time error:
numeric.d(206): Error: variable result used before set

Compile with default compiler settings.  Result:  Compiles, assert failure:
core.exception.asserter...@std.numeric(115): Assertion failure

Compile with -release to disable asserts but without -O to prevent compiler
from noticing variable used before set.  Runs, produces incorrect result. 

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

Reply via email to