www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1881] New: feqrel nonsensical for two identical float arguments

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1881

           Summary: feqrel nonsensical for two identical float arguments
           Product: D
           Version: 2.011
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: clugdbug yahoo.com.au
        ReportedBy: clugdbug yahoo.com.au


Given
float a;
assert(feqrel(a,a) == real.mant_dig);

which is nonsensical; the return value should never exceed the precision of the
arguments. Should be float.mant_dig.

The solution is to turn feqrel into a template, and require both arguments to
be the same type.


-- 
Feb 29 2008
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1881


clugdbug yahoo.com.au changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED





Fixed D2.012


-- 
Mar 07 2008