bugGNU Octave - Bugs: bug #43717, rats LEN Matlab incompatibility

 
 

bug #43717: rats LEN Matlab incompatibility

Submitted by:  Andreas Weber <andy1978>
Submitted on:  Thu 27 Nov 2014 08:27:40 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 3 - LowItem Group: WTF, Matlab?!?
Status: NoneAssigned to: None
Originator Name: Open/Closed: Open
Release: 3.8.2Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Thu 27 Nov 2014 08:27:40 PM UTC, original submission:

Octave tries to find an approximation which fits into LEN (second arg of rats) but Matlab seems to do some fancy stuff to calculate a tolerance from the input vector X and LEN and then call rat with this tolerance. The strings returned from Matlab are often less shorter than LEN even if a better approximation would be possible.

For example octave returns 22/7 for rats(pi, 4) whereas Matlab returns " *", see http://octave.1599824.n4.nabble.com/Matlab-output-from-quot-rats-quot-wanted-tt4667406.html and the Matlab documentation under More About - Algorithms.

Personally I think Octave's behaviour is much better here but I want to document this here.

If someone want to investigate this further: Try a changeset after c490eac28bbb which fixed an overflow in rats (#43369).

Andreas Weber <andy1978>
Project Member

 

(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 rik5 (Updated the item)
  • -unavailable- added by andy1978 (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
    Thu 01 Jan 2015 02:58:27 PM UTCandy1978Item GroupMatlab Compatibility=>WTF, Matlab?!?
    Wed 31 Dec 2014 06:35:48 PM UTCrik5Priority5 - Normal=>3 - Low

    Back to the top


    Powered by Savane 3.1-cleanup1