bugGNU Octave - Bugs: bug #43374, rat provide leading unnecessary...

 
 

bug #43374: rat provide leading unnecessary line break

Submitter:  Markus Bergholz <markuman>
Submitted:  Tue 07 Oct 2014 07:15:36 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 3.8.2 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 27 Oct 2014 04:58:01 AM UTC, comment #1: 

I applied a variant of your patch here (http://hg.savannah.gnu.org/hgweb/octave/rev/e1713e281ac5).  Thanks for finding this and fixing it.  Closing report.

Rik <rik5>
Group administrator
Tue 07 Oct 2014 07:15:36 PM UTC, original submission:  

rat() provide a leading unnecessary line break which makes the output not evaluate-able (Works fine with matlab).


octave:1> rat(0.75)
ans =


1 + 1/(-4)

octave:2> eval(rat(0.75))
octave:3>


I've attached a quick patch which solves this problem.


octave:1> eval(rats(0.75))
ans =                 0.75


Markus Bergholz <markuman>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #32239:  rat_patch_1.patch added by markuman (844B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by markuman (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-10-27 rik5 StatusNone Fixed
        Open/ClosedOpen Closed
    2014-10-07 markuman Attached File- Added rat_patch_1.patch, #32239

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code