On 21 October 2012 12:03, LFS <[email protected]> wrote:
> Hiya Dave,
> What would the line of code look like to reseed it with the epoch thing each
> time I call it?
> Thanks so much,
>
> Linda

The truth is I don't know off hand. I've spent a lot of time porting
Sage to Solaris, but have not used it much at all. I'm sure Python has
some code to get the get the seconds since the Epoch. One thing to
watch with this method, is if you call it too often (less than once
per second), you will be seeding it with the same number, and so get
the same sequence. I know someone who came unstuck. It wa ok on a slow
computer, but when he went to a fast computer, the things went all
wrong, as he was seeding it with the same numbers.

I'll try to find an example in the Sage manual. I'm sure it must have
something on this, but personally I don't know how to best do it. I'm
just relying on my experience of using pseudo-random numbers in C code
for Monte Carlo modelling.

dave

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
Visit this group at http://groups.google.com/group/sage-support?hl=en.


Reply via email to