Search:

Type: Posts; User: EVOEx

Search: Search took 0.01 seconds.

  1. Thread: Prime Numbers

    by EVOEx
    Replies
    15
    Views
    5,782

    As I said, in this case the isPrime function...

    As I said, in this case the isPrime function wouldn't even be used. Sometimes, in a project that would grow, I would actually add it even if I don't use it directly just for completeness and future...
  2. Thread: Prime Numbers

    by EVOEx
    Replies
    15
    Views
    5,782

    Well, theoretically it IS less efficient......

    Well, theoretically it IS less efficient... Pushing the parameters, calling... Pfew, that's gotta be at least 3 clock cycles ;-). (Actually, I bet it's a bit more, but still very little)

    I...
  3. Thread: Prime Numbers

    by EVOEx
    Replies
    15
    Views
    5,782

    The "usual" method for finding out whether an...

    The "usual" method for finding out whether an integer is a prime number is to test all divisors (from low to high) until it finds one. If you split the test whether it is a prime and finding the...
  4. Thread: Prime Numbers

    by EVOEx
    Replies
    15
    Views
    5,782

    Please don't, that's horribly inefficient....

    Please don't, that's horribly inefficient. Because, probably, you need to find the lowest divisor to find out whether the number is a prime number. Probably, there should be one function,...
Results 1 to 4 of 4