Polyfit crashes octave 3.0.0
Ben Abbott
bpabbott at mac.com
Thu Apr 10 06:33:03 CDT 2008
On Apr 10, 2008, at 3:19 AM, Jaroslaw Pychowski wrote:
> --------
> Bug report for Octave 3.0.0 configured for i486-pc-linux-gnu
>
> Description:
> -----------
>
> Function polyfit causes segmentation fault.
> 51 is minimal affected value of n (see code below)
> Messages emitted before segmentation fault:
> octave:5> wn=polyfit(x,y,n);
> warning: matrix singular to machine precision, rcond = 1.83429e-25
> warning: attempting to find minimum norm solution
> panic: Segmentation fault -- stopping myself...
> attempting to save variables to `octave-core'...
> save to `octave-core' complete
> Segmentation fault
>
> Repeat-By:
> ---------
> n=51
> step=2/n;
> x=-1:step:1;
> y=abs(5*x);
> wn=polyfit(x,y,n);
I'm replying to report the results on Mac OSX.
On Mac OSX 10.5.2 with gfortran 4.3 and Apple's vecLib the results for
each of the mercurial branches are below.
branch: release-3-0-x
octave:6> n=51;
octave:7> step=2/n;
octave:8> x=-1:step:1;
octave:9> y=abs(5*x);
octave:10> wn=polyfit(x,y,n);
warning: matrix singular to machine precision, rcond = 1.83428e-25
warning: attempting to find minimum norm solution
warning: dgelsd: rank deficient 52x52 matrix, rank = 42
branch: default
octave:5> n=51;
octave:6> step=2/n;
octave:7> x=-1:step:1;
octave:8> y=abs(5*x);
octave:9> wn=polyfit(x,y,n);
octave:10>
The default branch uses QR decomposition. The 3-0-x release uses left
divide, but neither gives a seg-fault for me.
Ben
More information about the Bug-octave
mailing list