bugGNU Octave - Bugs: bug #30543, incompatibility for randn

 
 

bug #30543: incompatibility for randn

Submitter:  None
Submitted:  Sun 25 Jul 2010 12:12:10 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Wont Fix Assigned to:  None
Originator Name:  Lo Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.3.51
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 25 Jul 2010 01:00:17 PM UTC, comment #1: 

This is a known issue, but there isn't much that can be done about it without an extensive effort to reverse engineer the exact method matlab uses to select their random values. Fortunately there are few cases that you actually need to have bit accurate random values between matlab and Octave. If you really do need this, then the only solution is to overload the randn generator in matlab with one that is compatible with the Octave one.. I send a mex-file implementation of the rand and randn generators used in Octave a few years back to the lists and these should still work. You can find them at

http://sourceforge.net/mailarchive/forum.php?thread_name=425A617A.3010004%40motorola.com&forum_name=octave-dev

So sorry this problem just won't be fixed.

D.

David Bateman <dbateman>
Group Member
Sun 25 Jul 2010 12:12:10 PM UTC, original submission:  

for the following:

randn('state', 0);
randn(1)

Matlab, version 7.10.0.499 (R2010a), delivers:
ans = -0.4326

octave:
ans = -1.2248

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by dbateman (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-07-25 dbateman StatusNone Wont Fix
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code