[Issue 511] Various problems in the documentation
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Sat Nov 18 05:09:53 PST 2006
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=511
------- Comment #23 from smjg at iname.com  2006-11-18 07:09 -------
(In reply to comment #12)
> Created an attachment (id=55)
 --> (http://d.puremagic.com/issues/attachment.cgi?id=55&action=view) [edit]
> Listing for www.digitalmars.com/d/dbc.html
"SOLUTION:
        Replace long with float, double, or real, or use casts."
Using casts won't help the out contract to succeed.  However, what will help is
to change it to
    out (result)
    {
        assert(result * result <= x);
        assert((result + 1) * (result + 1) > x);
    }
-- 
    
    
More information about the Digitalmars-d-bugs
mailing list