www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 344] New: Typo in docs for std.math.ilogb

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

           Summary: Typo in docs for std.math.ilogb
           Product: D
           Version: 0.166
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: trivial
          Priority: P1
         Component: Phobos
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: clugdbug yahoo.com.au


Since this returns an int, it cannot possibly return +infinity.
It actually returns int.max, following the C99 standard.

 *      $(TABLE_SV
 *      <tr> <th> x               <th>ilogb(x)     <th> Range error?
 *      <tr> <td> 0               <td> FP_ILOGB0   <td> yes
 *      <tr> <td> &plusmn;&infin; <td> +&infin;    <td> no
 *      <tr> <td> $(NAN)          <td> FP_ILOGBNAN <td> no
 *      )

Should be:

 *      $(TABLE_SV
 *      <tr> <th> x               <th>ilogb(x)     <th> Range error?
 *      <tr> <td> 0               <td> FP_ILOGB0   <td> yes
 *      <tr> <td> &plusmn;&infin; <td> int.max     <td> no
 *      <tr> <td> $(NAN)          <td> FP_ILOGBNAN <td> no
 *      )


-- 
Sep 10 2006
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=344


bugzilla digitalmars.com changed:

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





Fixed in DMC 0.167.


-- 
Sep 19 2006