polyfit enters infinite loop

Ben Abbott bpabbott at mac.com
Sat Dec 6 16:21:23 CST 2008


On Dec 6, 2008, at 4:46 PM, Sergei Steshenko wrote:
>
> --- On Sat, 12/6/08, Thorsten Meyer <thorsten.meyier at gmx.de> wrote:
>
>> From: Thorsten Meyer <thorsten.meyier at gmx.de>
>> Subject: Re: polyfit enters infinite loop
>> To: bug at octave.org
>> Date: Saturday, December 6, 2008, 1:23 PM
>> Afief Halumi wrote:
>>> Bug report for Octave 3.0.1 configured for
>> i486-pc-linux-gnu
>>>
>>> Description:
>>> -----------
>>>
>>>  trying to polyfit log(x) when x starts at 0(
>> log(0)=-inf according to
>>> octave ) keeps running indefinitely(or at least for
>> over 15 minutes)
>>>
>>> Repeat-By:
>>> ---------
>>>
>>>  * x=0:0.1:10; y=log(x); polyfit(x,y,3);
>>>
>> I can confirm this bug with 3.0.1.
>>
>> In octave freshly built from the mercurial sources the
>> command returns:
>> octave:4> x=0:0.1:10; y=log(x); polyfit(x,y,3)
>> ans =
>>
>>   NaN   NaN   NaN  -Inf
>> So apparently, it has already been fixed.
>>
>> can somebody check in 3.0.3?
>>
>> Thorsten
>>
>
> In my case octave-3.0.3 hangs.
>
> Regards,
>  Sergei.

The "compatible" behavior would be

 >> x=0:0.1:10; y=log(x); polyfit(x,y,3)
ans =
    NaN   NaN   Inf  -Inf

Running the developer's source (a week or two old) give

octave:1> x=0:0.1:10; y=log(x); polyfit(x,y,3)
ans =
    NaN   NaN   NaN  -Inf

For me the result is instantaneous.

Ben




More information about the Bug-octave mailing list