Re: printf %g format

new topic     » goto parent     » topic index » view thread      » older message » newer message

rforno writes:
> Wouldn't be possible to modify the %g format so that it prints more than 4
> decimals in case they are not zero?

You can use field-width and precision specifiers 
with %g, just as with %f, %s, etc.

For example...

atom x
x = 1.12345678901234
printf(1, "%g", x)
printf(1, "%15.12g", x)

Regards,
   Rob Craig
   Rapid Deployment Software
   http://www.RapidEuphoria.com

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu