Re: %g format again
- Posted by Robert Craig <rds at RapidEuphoria.com> Nov 08, 2001
- 380 views
rforno writes: > Why the last item in the following line is printed with only 5 decimals? > > printf(1, "%g %g %g %g %g\n", {5, 5.00, 5.100000, 5.1200000, 5.12345678}) > > 5 5 5.1 5.12 5.12346 I'm using C's %g to implement Euphoria's %g. I guess 5 is the default chosen by the C implementers. If you want more digits you can specify a field width and a precision. Try some experiments. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com