Search:

Type: Posts; User: andrew89

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. No, I found an array online, formatted their list...

    No, I found an array online, formatted their list to match the format of mine and did a 'diff' in the terminal.

    Edit: It starts checking about 20k/second. The output file has gone up to...
  2. Replies
    7
    Views
    4,274

    I believe this would fall under homework policy...

    I believe this would fall under homework policy as well. I've been a member of a few sites like this one Matt, you're not very likely to come across a forum that will actually help you do that. ...
  3. Here's some output in case anyone wants to test:...

    Here's some output in case anyone wants to test:
    17613047
    17613049
    17613061
    17613091
    17613097
    17613137
    17613143
    17613151
    17613191
  4. I also said 8 gigs... meant mibs (how Ubuntu...

    I also said 8 gigs... meant mibs (how Ubuntu refers to megabytes)... As you all may or may not have been able to tell. I've been very tired lately.

    THIS is the source code I meant to post lol. ...
  5. Yes I did, I just copy/pasted from the backup...

    Yes I did, I just copy/pasted from the backup source file lol. You guys are going to have to forgive me for that. Nano isn't exactly the friendliest of text editors when it comes to mouse usage and...
  6. In the above post I said it now takes me 20...

    In the above post I said it now takes me 20 minutes to make a file of 8 gigs. Not so. That was before I implemented the changes. Now it takes about 30 seconds :)

    My parents think I'm hacking......
  7. I did actually, I just didn't update this since. ...

    I did actually, I just didn't update this since. I've made a few improvements to the code, but yeah. One of them is only checking odd numbers, then I implemented the sqrt without sqrt. It's been...
  8. Replies
    4
    Views
    1,851

    You just couldn't settle for a Hello World eh? ...

    You just couldn't settle for a Hello World eh?


    #include <stdio.h>
    #include <stdlib.h>
    #include <math.h>

    void mainmenu();
    int joke();
    int calculator();
  9. Started over, rewrote the majority of it using a...

    Started over, rewrote the majority of it using a dry-erase board. It works rather well now. Any thoughts, comments, suggestions, etc. are welcome and appreciated.
    #include<stdio.h>...
  10. I'm confused by that. I moved the variables from...

    I'm confused by that. I moved the variables from the top and inside int main() and int isPrime() and it's still happening just as before. Or were you referring to something else?


    //snip...
  11. Updated the source and now it hangs after...

    Updated the source and now it hangs after printing two numbers.

    #include<stdio.h>
    #include<math.h>
    #include<limits.h>
    long long int testNum;
    long long int testAgainst=2;
    short int isNumPrime;...
  12. Thank you for taking a peek grumpy....

    Thank you for taking a peek grumpy.
    #include<stdio.h>
    #include<math.h>
    #include<limits.h>

    long long int testNum;
    long long int testAgainst;
    short int isNumPrime;

    int isPrime(long long int...
  13. Prime #'s question. "Floating point exception" error.

    #include<stdio.h>
    #include<math.h>
    long long int testNum;
    long long int testAgainst;
    short int isNumPrime;

    int isPrime(long long int testNum, long long int testAgainst);

    int main()
    {
  14. Replies
    35
    Views
    4,280

    Seriously... I'm not easily annoyed, but this is...

    Seriously... I'm not easily annoyed, but this is ridiculous. You're ignoring everything everyone is telling you.

    ctrl+z may or may not make an EOF character, that's not the point.

    The point...
  15. Thank you :) I'll be reading this for a while if...

    Thank you :) I'll be reading this for a while if anyone needs me.

    Also, in case anyone was curious, I found the limit.

    /* Minimum and maximum values a `signed long long int' can hold. */
    # ...
  16. I understand that first part now, thank you...

    I understand that first part now, thank you though.

    I'm likely not going to keep GMP installed after I write, compile, and run this program once to generate the file. Afterwards I might remove...
  17. I want to go as high as I possibly can, and GMP...

    I want to go as high as I possibly can, and GMP is installed now. So how would I go about going higher with GMP?

    Edit: In case anyone wanted to know why, after all, this is completely...
  18. So after installing GMP I'd use: uint64_t...

    So after installing GMP I'd use:
    uint64_t primeNum; in order to declare something larger than what my compiler would normally be able to handle?
  19. I have 6 gb of RAM and an Intel quad core 2.5ghz...

    I have 6 gb of RAM and an Intel quad core 2.5ghz processor... that change anything (I don't think so, but I don't mind asking)? I can take only being able to calculate prime numbers up to...
  20. Replies
    12
    Views
    2,566

    Well... I imaging you know how to check if a...

    Well... I imaging you know how to check if a number is prime, as for the range--which as I understand the situation is what you have a problem with--then you only need to check numbers between 2 and...
  21. Mod limits.h? Function to check for prime #s? If not, could one create a .h to do so?

    A while back I created a program to check if a number was prime. Basically it checked to see if a number was divisible by any number between 2 and it's square root, if it returned true, the number...
  22. Replies
    12
    Views
    2,566

    You're really confusing. What is (n!)^2? Is...

    You're really confusing. What is (n!)^2? Is that any number to the second power? Any number XOR'ed to the second power? Then you start talking about brute force and prime numbers. Can you sum up...
  23. Replies
    12
    Views
    2,566

    Well... a prime number is any number that isn't...

    Well... a prime number is any number that isn't divisible by any number than itself. So once you find a factor or whatever it is you're looking for up there ^^^ you add a bit to check if that number...
  24. Replies
    2
    Views
    1,582

    Seriously... I don't know anyone who is going to...

    Seriously... I don't know anyone who is going to sift through 728 lines of code to fix your problem... especially when it uses gets(), itoa(), strcmpi(), etc.

    Tried to compile after a rewrite and...
  25. Replies
    24
    Views
    2,083

    I have no idea. I'm using linux and ctrl+z isn't...

    I have no idea. I'm using linux and ctrl+z isn't used for EOF.
Results 1 to 25 of 82
Page 1 of 4 1 2 3 4