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

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

[Octave-bug-tracker] [bug #57704] Exactly Matlab compatible behavior for


From: Rik
Subject: [Octave-bug-tracker] [bug #57704] Exactly Matlab compatible behavior for rats?
Date: Thu, 30 Jan 2020 21:00:09 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko

URL:
  <https://savannah.gnu.org/bugs/?57704>

                 Summary: Exactly Matlab compatible behavior for rats?
                 Project: GNU Octave
            Submitted by: rik5
            Submitted on: Thu 30 Jan 2020 06:00:07 PM PST
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Matlab Compatibility
                  Status: Confirmed
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Any

    _______________________________________________________

Details:

rats() has been much improved for the 6.1 release of Octave.  However, it is
still not identical to Matlab.  Do we care enough to spend programmer time on
this issue?

Example 1:


assert (rats (2.0005, 9), "4001/2000");


Octave produces "2" in this case, although if the string length is updated to
10 then the same answer is had.  This is because Octave reserves one extra
character for the minus sign in case it is present.  It isn't present here,
but the reservation has already occurred.

Example 2:


assert (rats (123, 2), " *");


Octave produces "123" which does seem incorrect.






    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?57704>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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