arand()

Discussion in 'C Programming' started by Pierre McCann, Nov 7, 2003.

  1. Howdy:

    I am working on some code (written by someone else), and this line cropped
    up:

    newParameters.row = currentParameters.row + (temp *
    step.row * arand());

    My questions are:
    1. What is the arand() function?
    2. How is it different from the rand() function?
    3. Is there a reference on the web that can be consulted for this
    information?
    Note on question #3: I'm not just asking without looking. I did have a
    quick look around, but no searches on "arand" or "arand()" seemed to give me
    what I was looking for.

    Thanks in advance for any help.

    Regards,

    pdm
     
    Pierre McCann, Nov 7, 2003
    #1
    1. Advertising

  2. Pierre McCann

    Alan Balmer Guest

    On Fri, 07 Nov 2003 17:12:38 GMT, "Pierre McCann" <>
    wrote:

    >I am working on some code (written by someone else), and this line cropped
    >up:
    >
    > newParameters.row = currentParameters.row + (temp *
    >step.row * arand());
    >
    >My questions are:
    >1. What is the arand() function?


    It's not standard C. Try asking on a newsgroup which discusses
    whatever platform this came from.

    --
    Al Balmer
    Balmer Consulting
     
    Alan Balmer, Nov 7, 2003
    #2
    1. Advertising

  3. "Pierre McCann" <> wrote:

    > I am working on some code (written by someone else), and this line cropped
    > up:
    >
    > newParameters.row = currentParameters.row + (temp *
    > step.row * arand());
    >
    > My questions are:
    > 1. What is the arand() function?


    It is not a standard C function, and therefore unfortunately off-topic
    in c.l.c. Furthermore, I never came across it, AFAICT.

    > 2. How is it different from the rand() function?


    It has an 'a' prepended. :) No, seriously: I don't have a clue.

    > 3. Is there a reference on the web that can be consulted for this
    > information?


    If it's part of a known extension library, a Google search should help.

    > Note on question #3: I'm not just asking without looking. I did have a
    > quick look around, but no searches on "arand" or "arand()" seemed to give me
    > what I was looking for.


    Well, in that case you should search the code you are working on and the
    libraries it uses (read: inspect the header files it includes). If this
    doesn't reveal any useful information, asking in a newsgroup dedicated
    to your implementation/OS/platform might help.

    > Thanks in advance for any help.


    Sorry for being unable to help any further, good luck to you.

    Regards
    --
    Irrwahn
    ()
     
    Irrwahn Grausewitz, Nov 7, 2003
    #3
  4. On Fri, 7 Nov 2003, Pierre McCann wrote:

    > Howdy:
    >
    > I am working on some code (written by someone else), and this line cropped
    > up:
    >
    > newParameters.row = currentParameters.row + (temp *
    > step.row * arand());
    >
    > My questions are:
    > 1. What is the arand() function?
    > 2. How is it different from the rand() function?
    > 3. Is there a reference on the web that can be consulted for this
    > information?
    > Note on question #3: I'm not just asking without looking. I did have a
    > quick look around, but no searches on "arand" or "arand()" seemed to give me
    > what I was looking for.


    You need to work on your googling skills. Try searching for "random number
    generator arand" and see what it get s you. Regardless, it is not part of
    the C standard and there appears to be more than one answer.

    --
    Send e-mail to: darrell at cs dot toronto dot edu
    Don't send e-mail to
     
    Darrell Grainger, Nov 7, 2003
    #4
  5. Pierre McCann

    CBFalconer Guest

    Pierre McCann wrote:
    >

    .... snip ...
    >
    > My questions are:
    > 1. What is the arand() function?

    .... snip ...

    It is the rand() function called by a dyslectic Canadian, eh.

    --
    Chuck F () ()
    Available for consulting/temporary embedded and systems.
    <http://cbfalconer.home.att.net> USE worldnet address!
     
    CBFalconer, Nov 8, 2003
    #5
    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.

Share This Page