Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rounding numbers larger than 32k
#1
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.
*****
Reply


Messages In This Thread
Rounding numbers larger than 32k - by Moneo - 01-15-2005, 09:59 AM
Rounding numbers larger than 32k - by Moneo - 01-16-2005, 06:31 AM
Rounding numbers larger than 32k - by Z!re - 01-16-2005, 03:52 PM
Rounding numbers larger than 32k - by Moneo - 01-24-2005, 06:41 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)