in reply to Re: sprintf on floating point
in thread sprintf on floating point
However, you could do it this way (though without using sprintf):perl -e 'print sprintf "%f", sprintf "%0.2f", 0.1' 0
Does that help?perl -e 'print 0 + sprintf "%0.2f", 0.001' 0 perl -e 'print 0 + sprintf "%0.2f", 0.1234' 0.12
-- Dan
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: sprintf on floating point
by Jaap (Curate) on Sep 05, 2002 at 14:30 UTC |