01-15-2005, 09:59 AM

Rounding algorithms generally use the INT function which will not handle numbers greater than 32k.

CHALLENGE:

Write a subroutine, function or sub-program that can correctly round positive or negative numbers using the "conventional rounding method", which is: add .5 and truncate.

Input is a double precision number, which can be signed.

Output is also a double precision number,which is a whole number that can be signed.

Please test your entries.

*****

CHALLENGE:

Write a subroutine, function or sub-program that can correctly round positive or negative numbers using the "conventional rounding method", which is: add .5 and truncate.

Input is a double precision number, which can be signed.

Output is also a double precision number,which is a whole number that can be signed.

Please test your entries.

*****