Skip to content
Prev 175579 / 398503 Next

"digits" in round()

On 3/31/2009 8:59 AM, (Ted Harding) wrote:
If printing in scientific notation takes up as much space or more than 
printing in regular notation, then regular notation will be used.

In this case the 5 digit scientific notation output of 1.2346e+09 takes 
10 characters, so the 10 character simple format is used instead.

The reason for this rule is that regular notation gives more information 
about the number.  If you had wanted to use 10 chars but be less 
expressive you would have used an explicit format.

Duncan Murdoch