On Oct 8, 7:36 am, "William Stein" <[EMAIL PROTECTED]> wrote:
> I do encourage David to open a trac ticket about this.  He's right that
> seeding the random number generator should be possible via a command
> line argument at startup.

But which random number generator?  libc, Python, libpari, NTL,
libgmp... not counting the many subprocesses that have their own
random number generator.

I have a rough proposal to try to bring some order to this mess.
Randomness in SAGE should be centered in a "randgen" object.  There is
a global default randgen, but others can be created.  All algorithms
that use random numbers should take an optional randgen parameter, and
use the numbers from there.  The numbers from a randgen would be
portable across architectures.

This would have several advantages.  Randomized algorithms could be
run repeatably, for testing or debugging.  All of our "random"
doctests could be tested, instead of ignored.

I would be willing to work on this, if people think it's a good idea.
What do you think?

Carl


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to