Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 224295 - sci-mathematics/octave (3.01 at least) - ch2rnd function echoes to the terminal window always
Summary: sci-mathematics/octave (3.01 at least) - ch2rnd function echoes to the termin...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Science Mathematics related packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-31 07:45 UTC by Sven Mattisson
Modified: 2008-06-02 11:00 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Mattisson 2008-05-31 07:45:25 UTC
In (at least) two places sime-colon line termination are missing.
See diff below.


Reproducible: Always

Steps to Reproduce:
1. ocatve
2. chi2rnd(1, 1, 3);
3.

Actual Results:  
octave:1> chi2rnd(1,1,3);
rnd =

   0.027498   0.010680   0.785842

octave:2> 


Expected Results:  
octave:1> chi2rnd(1,1,3);
octave:2> 


*** chi2rnd.m~	2008-05-21 21:23:29.000000000 +0200
--- chi2rnd.m	2008-05-31 09:27:37.000000000 +0200
***************
*** 68,74 ****
       if (find (!(n > 0) | !(n < Inf)))
         rnd = NaN * ones (sz);
       else
!        rnd = 2 * randg(n/2, sz)
       endif
    else
      [retval, n, dummy] = common_size (n, ones (sz));
--- 68,74 ----
       if (find (!(n > 0) | !(n < Inf)))
         rnd = NaN * ones (sz);
       else
!        rnd = 2 * randg(n/2, sz);
       endif
    else
      [retval, n, dummy] = common_size (n, ones (sz));
***************
*** 84,90 ****
  
      k = find ((n > 0) & (n < Inf));
      if (any (k))
!       rnd(k) = 2 * randg(n(k)/2, size(k))
      endif
    endif
  
--- 84,90 ----
  
      k = find ((n > 0) & (n < Inf));
      if (any (k))
!       rnd(k) = 2 * randg(n(k)/2, size(k));
      endif
    endif
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2008-05-31 16:52:03 UTC
What package is this bug report about?
Comment 2 Sven Mattisson 2008-05-31 17:34:10 UTC
This relates to sci-mathematics/octave-3.0.1 and I notice an unfortunate spelling error in the function name, it should be chi2rnd (in the file /usr/share/octave/3.0.1/m/statistics/distributions/chi2rnd.m)
Comment 3 Markus Dittrich (RETIRED) gentoo-dev 2008-06-02 11:00:11 UTC
Hi Sven,

Thanks much for the note and I've added a patch to
fix this to the overlay. Please also file a bug upstream
so the devs can fix this in the next release.

Best,
Markus