Re: printf %g format

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

Yes, I know. Maybe I was not clear. I was referring to the default, that is,
only %g.
----- Original Message -----
From: "Robert Craig" <rds at RapidEuphoria.com>
To: "EUforum" <EUforum at topica.com>
Subject: Re: printf %g format


>
>
> 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