|
From: William H. <ha...@ya...> - 2008-08-08 10:36:22
|
Do you mean every time you run the program, or every time you generate a random polynomial. If you mean the former, then you could modify randint to start with a global seed value (or values). At present it always starts with the seed values 4035456057 and 6748392731 which need to be coprime to 4294967311 and 4294967357 respectively. You could provide a function called z_random_seed or something like that which crunched away with the current time in milliseconds and came up with two 32 bit numbers which are coprime to those two values. If you do modify this function, can you ensure that if the seed function is not called that it uses the defaults that it currently uses, and also ensure that you make it work for 32 bit and 64 bit machines (you'll see there is separate code for both at present). Bill. --- Richard Howell-Peak <ric...@gm...> wrote: > When generating a random polynomial or using > something like randint, is it > possible to change the random seed because it keeps > giving me the same > polynomials every time. > > -- > Richard > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your > Move Developer's challenge > Build the coolest Linux based applications with > Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source > event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/> _______________________________________________ > flint-devel mailing list > fli...@li... > https://lists.sourceforge.net/lists/listinfo/flint-devel > |