i woiuld like to revist the rounding issues in powerbasic.
i am using another basic for finance problems.
but i need to use powerbasic now.
i don't want to use integers or binary coded decimal variables for math.
i read where the floating point variables use an IEEE STANDARD.
i also read that rounding is not done correctly using these IEEE STANDARD.
if i want to round a floating point variable of 2.5 to a whole number
i want the answer of 3.
i understand it will round to the nearest even number of 2 instead.
also is there a built in function that will truncate a floating point
to a whole number(chop off the numbers to the right of the decimal point)
thanks paul
[This message has been edited by paul d purvis (edited April 21, 2005).]
i am using another basic for finance problems.
but i need to use powerbasic now.
i don't want to use integers or binary coded decimal variables for math.
i read where the floating point variables use an IEEE STANDARD.
i also read that rounding is not done correctly using these IEEE STANDARD.
if i want to round a floating point variable of 2.5 to a whole number
i want the answer of 3.
i understand it will round to the nearest even number of 2 instead.
also is there a built in function that will truncate a floating point
to a whole number(chop off the numbers to the right of the decimal point)
thanks paul
[This message has been edited by paul d purvis (edited April 21, 2005).]
Comment