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

 
 

bug #30543: incompatibility for randn

Submitted by:  None
Submitted on:  Sun 25 Jul 2010 12:12:10 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: Wont FixAssigned to: None
Originator Name: LoOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.3.51
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project 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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 25 Jul 2010 01:00:17 PM UTCdbatemanStatusNone=>Wont Fix
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1