G
Gary Mayor
Hi,
What a nightmare i've been trawling deja all morning for a simple method
of rounding a number up to 2 decimal places. I've checked out the ceil
function which only rounds numbers up to no decimal places which is no
good. The printf function rounds numbers up and down.
Let's take this number
0.3325
I need it to be,
0.34
How do i do that. Do I have to write a routine that checks if there is a
third digit or what. The number is calculated for the UK VAT system at
17.5% i need the number rounded up to only 2 decimal places. Yes I have
checked perlfaq4.
Simple problem seems impossible answer.
Any ideas
Gary
What a nightmare i've been trawling deja all morning for a simple method
of rounding a number up to 2 decimal places. I've checked out the ceil
function which only rounds numbers up to no decimal places which is no
good. The printf function rounds numbers up and down.
Let's take this number
0.3325
I need it to be,
0.34
How do i do that. Do I have to write a routine that checks if there is a
third digit or what. The number is calculated for the UK VAT system at
17.5% i need the number rounded up to only 2 decimal places. Yes I have
checked perlfaq4.
Simple problem seems impossible answer.
Any ideas
Gary