[Tutor] Meaning of %g ?

Kent Johnson kent37 at tds.net
Fri Apr 14 11:58:32 CEST 2006

Alan Gauld wrote:
>>>> print "%14.3g\n%14.3e\n%14.3f" % (bignum,bignum,bignum)
>      1.23e+009
>     1.235e+009
> 1234567898.235
> Hopefully those examples show whats happening.
> I have no idea why %g is dropping a digit, it may even be a bug!

It looks to me like either a documentation error or a bug. It might be 
worth asking on c.l.py.


More information about the Tutor mailing list