octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #43717] rats LEN Matlab incompatibility


From: Andreas Weber
Subject: [Octave-bug-tracker] [bug #43717] rats LEN Matlab incompatibility
Date: Thu, 27 Nov 2014 20:27:41 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Iceweasel/31.2.0

URL:
  <http://savannah.gnu.org/bugs/?43717>

                 Summary: rats LEN Matlab incompatibility
                 Project: GNU Octave
            Submitted by: andy1978
            Submitted on: Do 27 Nov 2014 20:27:40 GMT
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Matlab Compatibility
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.8.2
        Operating System: Any

    _______________________________________________________

Details:

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).




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?43717>

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.gnu.org/




reply via email to

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