in reply to sprintf on floating point
<wrong>$_ = sprintf('%.f',sprintf('%1.2f', 2e-7))</wrong>
How about that?
UPDATE: sorry, i didn't test this. The '0+' approach is much better.
--
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: sprintf on floating point
by zigdon (Deacon) on Sep 05, 2002 at 14:17 UTC | |
by Jaap (Curate) on Sep 05, 2002 at 14:30 UTC | |
|
Re: Re: sprintf on floating point
by Jaap (Curate) on Sep 05, 2002 at 14:16 UTC |