Re: printf()
- Posted by Robert Craig <rds at RapidEuphoria.com> May 11, 2003
- 356 views
Juergen Luethje wrote: > I just detected that > > printf(1, "%d\n", {1e254}) > > prints 255 '*'s. I wonder, whether this is intended. Irv Mullins writes: >On Linux, it prints: >>99999999999999993635870693776759177364257073275700735648394407233581562780527075488933869 >>94586947577981035182609405692455150664165314335743772262409420005560181719702721238568128 >8624374039982763538319739206631507774359582937997162411679696940490282762240 No, it wasn't intended. I'll make a note of it. Thanks. Euphoria's printf() does a bit of pre-processing before calling C's printf(). The asterisks were generated by Watcom C, used to build the DOS and WIN interpreters. On Linux, GCC gives a better result (accurate to about 16 decimal places.) Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com