help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: recursion and fsolve


From: John W. Eaton
Subject: Re: Re: recursion and fsolve
Date: Fri, 6 Aug 2004 11:01:20 -0400

On  6-Aug-2004, David Bateman <address@hidden> wrote:

| We are using the same generator as Mathworks for rand.

What is the history of the code?  How did you arrive at the same
generator?  Is there a publicly available description somewhere (other
than the M-file I know about that has no explicit copyright or license
statement with it)?

| 3) Check that all versions of matlab return the same sequences.

I don't think they do, as there is apparently a different generator in
version 4 and earlier.  If you use

  rand ('seed')

you are using the earlier generator.  If you use

  rand ('state')

you are using the newer one.

| I think the cost of exact matlab compatiablity is quite high here as octave's
| entropy pool is a big plus. And even if we wanted complete compatiability 
| there is quite some work to achieve it. 

The level of compatibility I'm most interested in is to be able to set
the seed and get the same sequence of numbers from both Matlab and
Octave, if possible.  Given that they have changed the generator in
the past, this may not be reasonable.  But there are other features
that have changed over the years and we have also followed in the name
of compatibility.  This case is slightly different, because they could
switch to some magic private algorithm that we could not guess.  If
so, then compatibility is probably not possible and we stop worrying
about it and do something else.

It does seem that they always start from the same point.  We could do
that while also providing a function to generate a state for the
generator from some external source of randomness.  That way we get
compatibility and an easy way to generate different sequences for each
run.

jwe




-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]