in reply to Rounding of a number...
The VALLUE that prints as 10.06 is 10.06538.use POSIX; my $y=523.4; printf('%7.2f',floor($y*100/52)/100); --Output--- 10.06
..."I don't know what the facts are but somebody's certainly going to sit down with him and find out what he knows that they may not know, and make sure he knows what they know that he may not know, and that's a good thing. I think it's a very constructive exchange," --Donald Rumsfeld
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Rounding of a number...
by xdg (Monsignor) on Dec 27, 2004 at 14:45 UTC |