Search:

Type: Posts; User: Hodor

Page 1 of 20 1 2 3 4

Search: Search took 0.02 seconds.

  1. Thread: FPN math

    by Hodor
    Replies
    43
    Views
    566

    I've just read the chapter on floating point...

    I've just read the chapter on floating point numbers in Knuth's TAOCP (Vol. 2) and also some of the IEEE specification and all I have to say is that I'm glad you're doing this and not me LOL
  2. Ok, you haven't asked a question, but I'll ask...

    Ok, you haven't asked a question, but I'll ask you one. Forget about programming a solution for the moment. Can you solve the problem, for any of the mazes, using just pen and paper? Not solve as in...
  3. Well, make an attempt and ask a question! You...

    Well, make an attempt and ask a question! You haven't even asked a question yet, you've just provided a bunch of crappy incomplete code that we're all suppose to stare at in awe(?)
  4. So all of this is yours? // This procedure...

    So all of this is yours?



    // This procedure must clean up graph by removing all nodes in which the previous and
    // next nodes have the same x or y value as it.
    void cleanUpGraph(Node * n,...
  5. It appears that you haven't even tried :/ ...

    It appears that you haven't even tried :/

    Edit: P.S. if that current code is written by your teacher then they're a crappy programmer.
  6. Thread: 3D Tic Tac Toe

    by Hodor
    Replies
    2
    Views
    120

    Turn on your compiler warnings. I haven't...

    Turn on your compiler warnings. I haven't compiled your code, but line 710 should have == and not = so that's one jump out at me mistake that any modern compiler should warn about

    change

    ...
  7. Replies
    1
    Views
    65

    In your second main loop (line 22), you use z...

    In your second main loop (line 22), you use z (e.g. boardTwo[0][y][z]), but the scope of z when declared as part of the for loop itself, like you've done, is the loop; i.e. 'z' does not (or should...
  8. Replies
    5
    Views
    175

    I don't think "a code" (LMAO) is necessary since...

    I don't think "a code" (LMAO) is necessary since code (in lots of languages, including C++) for generating and printing this sequence is available all over the place and a simple google search away....
  9. Regarding 6k 1 Prime Number -- from Wolfram...

    Regarding 6k 1 Prime Number -- from Wolfram MathWorld gives citations

    See also https://pdfs.semanticscholar.org/ba51/12ec470de71a6f1574c41d483ac9393ad0d3.pdf
  10. Well, I don't know where there is a formal proof...

    Well, I don't know where there is a formal proof but it's mentioned on the Wikipedia page (Primality test - Wikipedia)
  11. I'd be wary of using -ffast-math as it enables...

    I'd be wary of using -ffast-math as it enables "unsafe" optimisations that can (and does) break IEEE compliance. It also disables the proper setting of errno (edit: actually it stops setting errno...
  12. Thread: mitsy

    by Hodor
    Replies
    13
    Views
    217

    Changes I made to get it to build @@ -1,5...

    Changes I made to get it to build



    @@ -1,5 +1,6 @@
    +#include <float.h>
    #include "mcc_get.h"
    int mcc_encoding_type = 0;
    int mcc_encoding_node = mcc_encoding_count;
    char const *env_LANG...
  13. Thread: mitsy

    by Hodor
    Replies
    13
    Views
    217

    I see you applied the fix. You may have missed...

    I see you applied the fix. You may have missed it, but I mentioned another line in the first post (kind of easy to miss consider I only mentioned it in parenthesis on the first line of the post...
  14. Thread: Curropted text

    by Hodor
    Replies
    17
    Views
    280

    Maybe it appears fixed, but it's not. The text...

    Maybe it appears fixed, but it's not. The text isn't corrupted but there's still a bug



    /* Should work yet somehow does not stop at '\0' like should */
    ...
  15. Thread: dynamic stack

    by Hodor
    Replies
    5
    Views
    107

    C only has pass by value semantics. If the value...

    C only has pass by value semantics. If the value passed is an address it's an address. No need to complicate things.
  16. Thread: Curropted text

    by Hodor
    Replies
    17
    Views
    280

    Well, I got it to compile by checking out to a...

    Well, I got it to compile by checking out to a previous git revision. I can't say I really understand what's going on though, I find it pretty complicated. I do know where the problem is though....
  17. Replies
    2
    Views
    105

    Probably because student1.name[10] is not an...

    Probably because student1.name[10] is not an array (or char *) but... a single character.

    You'll need to copy the student's name into the array somehow

    Maybe


    snprintf(student1.name, 10,...
  18. Why is everyone concentrating on how the integers...

    Why is everyone concentrating on how the integers are being read when that's not even the primary problem with the program?
  19. While this is clearly correct (according to the C...

    While this is clearly correct (according to the C standard since the inception of ANSI C and the C standard) and it's been an interesting diversion, maybe it'd be good to get back to the OP's...
  20. Thread: Curropted text

    by Hodor
    Replies
    17
    Views
    280

    make word.run doesn't work for me (3 errors in...

    make word.run doesn't work for me (3 errors in mcc_get.c)



    $ make word.run
    cc -fPIC -Wall -Wno-multichar -shared -o ./libmcc_mem.so -c mcc_mem.c
    cc -fPIC -Wall -Wno-multichar -shared -o...
  21. Thread: mitsy

    by Hodor
    Replies
    13
    Views
    217

    mcc_get.c line 272 (see also line 325 which I...

    mcc_get.c line 272 (see also line 325 which I think exhibits the same problem)



    if ( c >= 0xD000 || c <= 0xDFFF )


    Surely this always evaluates to true. As an example, I'll change it to...
  22. char might be signed or unsigned (the result of...

    char might be signed or unsigned (the result of digit-- is undefined behaviour if its value is 0)



    The rest looks like you've been trying random changes hoping they might work... dunno... messy...
  23. Thread: mitsy

    by Hodor
    Replies
    13
    Views
    217

    I've forgotten my github password and keys lmao

    I've forgotten my github password and keys lmao
  24. Replies
    11
    Views
    307

    It's probably to also good to note that the...

    It's probably to also good to note that the formulas in the book give the incorrect day of the week number as well for some years. For example, using the book's formulas it says that 1 March 2100 is...
  25. Replies
    11
    Views
    307

    Well, first, it's not my formula. As a comment in...

    Well, first, it's not my formula. As a comment in the code I referenced the paper by Peter Baum.

    But where is


    x = (aa - 621049) % 7;


    Coming from? If it's from the same book as your...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4