[Issue 10860] New: [CTFE] Static assert real.min_normal*real.max > 2 is false in some context

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Aug 20 11:30:31 PDT 2013


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

           Summary: [CTFE] Static assert real.min_normal*real.max > 2 is
                    false in some context
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: CTFE
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: maxim at maxim-fomin.ru


--- Comment #0 from Maxim Fomin <maxim at maxim-fomin.ru> 2013-08-20 11:30:29 PDT ---
Considering the code from
https://github.com/D-Programming-Language/phobos/blob/master/std/math.d#L2894

void main()
{
   static assert(real.min_normal*real.max > 2);
}

This runs fine, but when dmd is executed under valgrind expression
real.min_normal*real.max is evaluated to -nanL and assertion fails. It may
happen due to different FPU environment, some bug in ctfe, flawed assertion, or
combination of thereof.

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