[Top][All Lists]

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

[Octave-bug-tracker] [bug #57564] Implementation of rng

From: Guillaume
Subject: [Octave-bug-tracker] [bug #57564] Implementation of rng
Date: Thu, 9 Jan 2020 09:43:28 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0


                 Summary: Implementation of rng
                 Project: GNU Octave
            Submitted by: gyom
            Submitted on: Thu 09 Jan 2020 02:43:27 PM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Matlab Compatibility
                  Status: None
             Assigned to: None
         Originator Name: Guillaume
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Any



Matlab has a "rng" function to set and query the state of the random number
This is the recommended syntax. The use of rand('state',...) is discouraged
and not documented any more:

I attach a possible implementation for Octave. Currently, Octave has a
separate generator for rand and randn so rng stores both states: if and when
Octave evolves to use a single generator, the rng function can be updated
internally without any visible change from the outside. This means that, in my
eye, rng can be considered for inclusion in Octave now even if some work is
still to take place in rand/randn.


File Attachments:

Date: Thu 09 Jan 2020 02:43:27 PM UTC  Name: rng.m  Size: 9KiB   By: gyom



Reply to this item at:


  Message sent via Savannah

reply via email to

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