Re: integer divide by 7 trick?

Discussion in 'C++' started by JS, Jul 21, 2003.

  1. JS

    JS Guest

    On Sun, 20 Jul 2003 01:05:40 -0700, krazyman wrote:

    > Does anyone know a good trick to perform an integer divide by 7
    > (the equivalent of x/7 in C) without using a divide?


    I may be wrong but, aren't modern compilers supposed to be savvy enough
    to do such things?
    JS, Jul 21, 2003
    #1
    1. Advertising

  2. > > Does anyone know a good trick to perform an integer divide by 7
    > > (the equivalent of x/7 in C) without using a divide?

    >
    > I may be wrong but, aren't modern compilers supposed to be savvy

    enough
    > to do such things?


    Yes.

    --
    Peter van Merkerk
    peter.van.merkerk(at)dse.nl
    Peter van Merkerk, Jul 22, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. MG
    Replies:
    5
    Views:
    425
    Christian Bau
    Jul 22, 2003
  2. Robert W Hand

    Re: integer divide by 7 trick?

    Robert W Hand, Jul 20, 2003, in forum: C++
    Replies:
    12
    Views:
    676
    Paul Hsieh
    Jul 25, 2003
  3. yvan joffre

    Re: integer divide by 7 trick?

    yvan joffre, Jul 25, 2003, in forum: C++
    Replies:
    3
    Views:
    284
    Stewart Gordon
    Jul 25, 2003
  4. MG

    Re: integer divide by 7 trick?

    MG, Jul 20, 2003, in forum: C Programming
    Replies:
    5
    Views:
    3,904
    Christian Bau
    Jul 22, 2003
  5. Robert W Hand

    Re: integer divide by 7 trick?

    Robert W Hand, Jul 20, 2003, in forum: C Programming
    Replies:
    12
    Views:
    601
    Paul Hsieh
    Jul 25, 2003
Loading...

Share This Page