Bill Denney | 1 Mar 04:55 2006

mkdir, rmdir should be marked as commands

I just noticed that in 2.9.4 on Debian, chdir is marked as a command 
(iscommand("chdir") == 1), but neither mkdir nor rmdir are.  I saw how I 
could change it for the current session, but that didn't seem apropriate.

Bill

--

-- 
"Permit me to issue and control the money of a nation, and I care not
who makes its laws."
   -- Amschel Mayer Rothschild

-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------

John W. Eaton | 1 Mar 07:15 2006
Picon

determinant of integer values

On  1-Mar-2006, Peter Lempel Søndergaard wrote:

| the following code
| 
| A=[1 0; 1 12];
| det(A)
| 
| produces:
| 
| ans = 12.000
| 
| instead of the better result ans = 12 .
| 
| I am using Fedora 4 with the lastest rpms installed, Octave 2.1.72 and
| Octave-forge.
| 
| This is slightly annoying, because gcd will not work with 12.000, so I
| have to round the number. Matlab gets this one correctly.

Bug reports belong on the bug <at> octave.org list so I'm copying this
message there.  If you reply, please remove the help list from the
list of recipients.

The problem is that Octave stores the value of the determinant
internally as det = a*10^b so it does not overflow or underflow
unnecessarily.  For the scripting language, we always convert to a
double value, so DET can produce Inf, but in C++ code you can look at
the values of A and B to find a better estimate of the value.

Perhaps the best fix is to change the internal representation of the
(Continue reading)

Miquel Cabanas | 1 Mar 09:43 2006
Picon
Picon

Re: determinant of integer values

hi,

On Wed, 2006-03-01 at 01:15 -0500, John W. Eaton wrote:
> Does anyone have a good way to efficiently and accurately convert from
> c*2^d to a*10^b?

there's a link at the IBM's General Decimal Arithmetic
http://www2.hursley.ibm.com/decimal/ (search for "Conversions", right
column, close to the end) pointing to a paper by David M. Gay, Correctly
Rounded Binary-Decimal and Decimal-Binary Conversions. There's also a
link to the C-source code file implementing the conversion algorithm
(Netlib site, dtoa.c file).

Hope this helps,

Miquel

--

-- 
Miquel Cabanas, TSSR -----------------------------------------------
Servei de Ressonancia Magnetica Nuclear,
Universitat Autonoma de Barcelona 
------------------------------------------o-oo--ooo---ooo--oo-o-----

-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------
(Continue reading)

Agnes Bousquier | 1 Mar 14:24 2006
Picon

bug with .oct files

*************Note**********************
  This bug looks like the one described in the following post :
  http://www.octave.org/octave-lists/archive/bug-octave.2005/msg00834.html
  so, it may be the same bug, which have not been corrected on version 
2.1.72

--------
Bug report for Octave 2.1.72 configured for i686-pc-cygwin

Description:
-----------

  When I try to execute a pre-compiled function which I compiled with 
'mkoctfile', octave exits without outputting anything.

Repeat-By:
---------

  $ mkoctfile hello.cc
  $ octave
  $ octave:1> hello

    The same bug occurs with all other cc files I tested 
('oregonator.cc' and 'make_int.cc')

Configuration (please do not edit this section):
-----------------------------------------------

uname output:     CYGWIN_NT-5.1 pci-5 1.5.19(0.150/4/2) 2006-01-20 13:28 
i686 Cygwin
(Continue reading)

xing | 1 Mar 19:17 2006
Picon

error when using anovan.m

Dear Mr. Adler,

I am working on a 5 factors ANOVA problem
Factor A: 2 levels
Factor B: 2 levels
Factor C: 2 levels
Factor D: 4 levels
Factor E: 4 levels

Each case has 7 replications. When using anovan.m, :
1. Only modeltype 'full' works. Both 'linear' and 'interaction' gave error message: "Divide by zero...";
2. The results from anovan.m ('full') are correct (I have compared with those obtained from R); But the
sequence of results looks confusing, not following the sequence:
A,
B,
C,
D,
E,
AB,
AC,
etc.

Is there any way to set up the sequence? 

Thanks in advance for your help

Sichong Guan

-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
(Continue reading)

Andy Adler | 1 Mar 21:20 2006
Picon

Re: error when using anovan.m

I'm not sure I understand what the problem is.
YOu say the results are correct.

I'm aware that anovan.m is not complete. Fixing it
is on my TODO list.
--
Andy Adler <adler <at> site.uOttawa.ca> 1(613)562-5800x6218

On Wed, 1 Mar 2006 xing <at> bellsouth.net wrote:

> Dear Mr. Adler,
>
> I am working on a 5 factors ANOVA problem
> Factor A: 2 levels
> Factor B: 2 levels
> Factor C: 2 levels
> Factor D: 4 levels
> Factor E: 4 levels
>
> Each case has 7 replications. When using anovan.m, :
> 1. Only modeltype 'full' works. Both 'linear' and 'interaction' gave error message: "Divide by zero...";
> 2. The results from anovan.m ('full') are correct (I have compared with those obtained from R); But the
sequence of results looks confusing, not following the sequence:
> A,
> B,
> C,
> D,
> E,
> AB,
> AC,
(Continue reading)

John W. Eaton | 2 Mar 04:31 2006
Picon

Re: determinant of integer values

On  1-Mar-2006, Miquel Cabanas wrote:

| On Wed, 2006-03-01 at 01:15 -0500, John W. Eaton wrote:
| > Does anyone have a good way to efficiently and accurately convert from
| > c*2^d to a*10^b?
| 
| there's a link at the IBM's General Decimal Arithmetic
| http://www2.hursley.ibm.com/decimal/ (search for "Conversions", right
| column, close to the end) pointing to a paper by David M. Gay, Correctly
| Rounded Binary-Decimal and Decimal-Binary Conversions. There's also a
| link to the C-source code file implementing the conversion algorithm
| (Netlib site, dtoa.c file).

I don't think dtoa is really what I'm looking for here.  But that's
OK, as I also think it turns out to be much simpler than I originally
thought.  Given a*2^b, we want to find c*10^d, restricting d to be an
integer (and I suppose we could even skip that part).  So we just need
to solve for x in 10^x = 2^b, then split x into integer and remainder
(x_int = round (x); x_rem = x - x_int), then compute c = a*10^x_rem.
The following patch does this for both the real and complex
determinants.  It seems to work.  Now I get integer values for
determinants of integer matrices.

jwe

liboctave/ChangeLog:

2006-03-01  John W. Eaton  <jwe <at> octave.org>
(Continue reading)

John W. Eaton | 2 Mar 04:33 2006
Picon

bug with .oct files

On  1-Mar-2006, Agnes Bousquier wrote:

| *************Note**********************
|   This bug looks like the one described in the following post :
|   http://www.octave.org/octave-lists/archive/bug-octave.2005/msg00834.html
|   so, it may be the same bug, which have not been corrected on version 
| 2.1.72
| 
| 
| --------
| Bug report for Octave 2.1.72 configured for i686-pc-cygwin
| 
| Description:
| -----------
| 
|   When I try to execute a pre-compiled function which I compiled with 
| 'mkoctfile', octave exits without outputting anything.
| 
| Repeat-By:
| ---------
| 
|   $ mkoctfile hello.cc
|   $ octave
|   $ octave:1> hello
|  
|     The same bug occurs with all other cc files I tested 
| ('oregonator.cc' and 'make_int.cc')

What compiler version are you using?  The Cygwin version of Octave
will only work with 3.3 due to some bugs in the compiler for Cygwin.
(Continue reading)

Agnes Bousquier | 2 Mar 09:31 2006
Picon

Re: bug with .oct files

John W. Eaton a écrit :
> On  1-Mar-2006, Agnes Bousquier wrote:
>
> | *************Note**********************
> |   This bug looks like the one described in the following post :
> |   http://www.octave.org/octave-lists/archive/bug-octave.2005/msg00834.html
> |   so, it may be the same bug, which have not been corrected on version 
> | 2.1.72
> | 
> | 
> | --------
> | Bug report for Octave 2.1.72 configured for i686-pc-cygwin
> | 
> | Description:
> | -----------
> | 
> |   When I try to execute a pre-compiled function which I compiled with 
> | 'mkoctfile', octave exits without outputting anything.
> | 
> | Repeat-By:
> | ---------
> | 
> |   $ mkoctfile hello.cc
> |   $ octave
> |   $ octave:1> hello
> |  
> |     The same bug occurs with all other cc files I tested 
> | ('oregonator.cc' and 'make_int.cc')
>
> What compiler version are you using?  The Cygwin version of Octave
(Continue reading)

John W. Eaton | 3 Mar 04:49 2006
Picon

mkdir, rmdir should be marked as commands

On 28-Feb-2006, Bill Denney wrote:

| I just noticed that in 2.9.4 on Debian, chdir is marked as a command 
| (iscommand("chdir") == 1), but neither mkdir nor rmdir are.  I saw how I 
| could change it for the current session, but that didn't seem apropriate.

I checked in following change.  The rmdir command is now pretty
scary.  Don't accidentally type something like this:

  rmdir ~ s

Should we maybe try to make it safer by having it ask for
confirmation by default?

jwe

2006-03-02  John W. Eaton  <jwe <at> octave.org>

	* dirfns.cc (Fmkdir, Frmdir): Now commands.

Index: src/dirfns.cc
===================================================================
RCS file: /cvs/octave/src/dirfns.cc,v
retrieving revision 1.94
diff -u -r1.94 dirfns.cc
--- src/dirfns.cc	13 Jan 2006 21:17:38 -0000	1.94
+++ src/dirfns.cc	3 Mar 2006 03:45:57 -0000
 <at>  <at>  -291,7 +291,7  <at>  <at> 
 // XXX FIXME XXX -- should maybe also allow second arg to specify
 // mode?  OTOH, that might cause trouble with compatibility later...
(Continue reading)


Gmane