Search:

Type: Posts; User: Kappie

Search: Search took 0.00 seconds.

  1. Replies
    23
    Views
    3,352

    Hey guys, thanks for the resources, will try! The...

    Hey guys, thanks for the resources, will try! The factor 2 I put in my initial post is indeed WRONG, it should be factor 6. The code should still return true for all pentagonal numbers, of course.
    @...
  2. Replies
    23
    Views
    3,352

    P(10000) = 149995000. I use g++ as compiler. I...

    P(10000) = 149995000. I use g++ as compiler. I don't now how large an int is. I couldn't find it on the web either. I'm not very knowledgeable about this kind of technical details, but I'm surely...
  3. Replies
    23
    Views
    3,352

    I tried this code: (I assume this is what you...

    I tried this code: (I assume this is what you ment)



    bool is_pentagonal(int x)
    {
    int n = sqrt(24 * x + 1);
    return n * n == 24 * x + 1;
    }
  4. Replies
    23
    Views
    3,352

    Problem: test if solution is integer

    Hey everyone,

    for some purpose, I need to check for large numbers if they are pentagonal. By far the fastest check is to solve the following equation:

    f(x) = ( sqrt(24x + 1) + 1 ) / 2

    if...
  5. Splitting a huge string in several smaller strings

    Hello everyone, this is my problem:

    I have a .txt file with a huge string of names, seperated like this:

    "BELLA, "JONATHAN", ...

    I need to operate on each name, so I want to store them in a...
  6. Replies
    4
    Views
    1,335

    But then const int n should work? In general,...

    But then const int n should work?

    In general, is the bitset container for sieve (true or false) purposes the fastest way of implementing? (memory wise it should be best, I assume, but how about...
  7. Replies
    4
    Views
    1,335

    Bitset initialisation error

    Hi everyone, I'm having trouble compiling a sieve of eratosthenes function. I'm using a bitset. The algorithm should work, but the problem lies in the variable bitset size.


    vector<int> Erat(int...
  8. Replies
    5
    Views
    2,048

    Thanks very much! I'm reading the command-line...

    Thanks very much! I'm reading the command-line version right now. I've read in different places that using the command-line instead of IDE is preferable, so I'm already (to some extent) familiar with...
  9. Replies
    5
    Views
    2,048

    I need cues on how to write my own assembler....

    I need cues on how to write my own assembler. I've tried Google search but it's too much information all at once - I need simple steps on how to from here to actually being able to get into algorithm...
  10. Replies
    5
    Views
    2,048

    The Art of Computer Programming

    I'm a beginning programmer and I want to try this book. I'm a physics student with extra mathematics in my curriculum. Understanding the math should be a challenge, but not an unconquerable one.
    ...
Results 1 to 10 of 10