On Wed, Sep 29, 2010 at 2:44 PM, Roman Divacky <rdivacky_at_freebsd.org> wrote: > heh, now I noticed that Derek already wrote that ;) is anyone able > to find where in perl sources the rand function is defined? I failed > that :( It's using drand48() instead of rand() root_at_botelhor:/usr/ports/lang/perl5.12# make configure |& grep -i rand drand48_r() NOT found. random_r() NOT found. srand48_r() NOT found. srandom_r() NOT found. Looking for a random number function... Good, found drand48(). Use which function to generate random numbers? [drand48] Checking how to generate random libraries on your machine... Test results here: GCC libc: garga_at_botelhor:~/testes> ./test random value 0.396465 clang libc: garga_at_botelhor:~/testes> ./test random value -inf Source of test.c: #include <stdlib.h> #include <stdio.h> #include <string.h> int main() { printf("random value %f\n", drand48()); exit(0); } -- Renato BotelhoReceived on Wed Sep 29 2010 - 16:22:32 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:07 UTC