Handling big FP numbers
    Adam D. Ruppe 
    destructionator at gmail.com
       
    Sat Feb  9 03:28:24 UTC 2019
    
    
  
On Saturday, 9 February 2019 at 03:21:51 UTC, Murilo wrote:
> Now, changing a little bit the subject. All FPs in D turn out 
> to be printed differently than they are in C and in C it comes 
> out a little more precise than in D. Is this really supposed to 
> happen?
Like I said in my first message, the D default rounds off more 
than the C default. This usually results in more readable stuff - 
the extra noise at the end is not that helpful in most cases.
But you can change this with the format specifiers (use 
`writefln` instead of `writeln` and give a precision argument) 
or, of course, you can use the same C printf function from D.
    
    
More information about the Digitalmars-d-learn
mailing list