Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A different and better way to find prime numbers
#13
Quote: ..... I also did a test and an overflow only occurred with the value 2,147,483,648, not 2,147,483,647 .....
Your analysis of the "rounding floating point numbers to integers" seems to be correct. Why doesn't the documentation just say rounded to a LONG integer instead of pussy-footing with the wording?

Anyway, whether the max value that I tested is 1 off from your experience, does not seem to matter much. The point is that the max is directly related to the max of the LONG, regardless what the variable is defined as.

Thanks for getting involved and shedding some light on the subject.
*****
Reply


Messages In This Thread
A different and better way to find prime numbers - by Moneo - 09-18-2005, 12:38 AM

Forum Jump:


Users browsing this thread: 3 Guest(s)