I want to add that however random's are changed, e.g., for the integers,
the current behavior MUST still be available. The reason is because most
benchmarks I know about for other systems use uniformly chosen random
numbers in an interval.   Loosing this behavior would make it much much
more painful to do comparative benchmarks.

On 3/2/07, David Roe <[EMAIL PROTECTED]> wrote:
> I've been thinking about random elements a bit for p-adics.  There are lots
> of good and reasonable ways to generate random elements of things.  For
> example, in addition to Robert's suggestion, we could have a Gaussian
> distribution with a specified mean, or a Poisson distribution...  It seems
> like a reasonable way to do it would be to have an algorithm = {uniform,
> gaussian,...} argument to the random element function and thus have lots
> available (ie however many we decide to write).  Then if someone wants to
> know what kind of random distributions they can generate, they can just
> check the docstring for the function.  Of course, this still leaves the
> question of which is the default...
>
> Anyway, I'm planning on doing this for p-adics.  Thought I might throw the
> idea in for integers too.
> David
>
>
> >It's always bugged me that the default distribution for integers (and
> >rationals) is just a uniform distribution over some small range. What
> >if instead we chose the distribution ZZ.random_element() = floor(1/r)
> >where r is uniformly distributed in (-1,1). Then P(n) = 1 / (2 |n| (|
> >n| + 1)) for all n in Z-{0}. This gives mostly small numbers with the
> >occasional large ones thrown in at ever decreasing probabilities.
> >
> >A random rational could then be the ratio of two such integers.
> >
> >- Robert
>
>
>  >
>


-- 
William Stein
Associate Professor of Mathematics
University of Washington

--~--~---------~--~----~------------~-------~--~----~
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