Search:

Type: Posts; User: Click_here

Search: Search took 0.05 seconds.

  1. Replies
    33
    Views
    15,737

    Hmmm... It doesn't work if a is very big and b...

    Hmmm...

    It doesn't work if a is very big and b is very small.
  2. Replies
    33
    Views
    15,737

    OK - I've done it and the numbers that you were...

    OK - I've done it and the numbers that you were having trouble with are now working.

    How I did it was to take the integers into the function unsigned, and the add (unsigned int)(-2147483648) that...
  3. Replies
    33
    Views
    15,737

    Can you use larger variables in your...

    Can you use larger variables in your calculations?

    i.e.




    int isitGreater(int a, int b)
    {
    long int x = (long int) a;
  4. Replies
    33
    Views
    15,737

    In that case, I think that there is nothing wrong...

    In that case, I think that there is nothing wrong with the code you have.

    If it is not working, you are going to have to explain what is not working.
  5. Replies
    33
    Views
    15,737

    Hey, I have to admit that I have a soft-spot...

    Hey,

    I have to admit that I have a soft-spot for bitwise operations.

    I have a few suggestions for you

    ((~x)+1))
    This is the 2's complement that is a lot easier to write like this:
    ...
Results 1 to 5 of 5