qp() in Octave 3.0.0 returns result egregiously violating input constraints

Ben Abbott bpabbott at mac.com
Sun Apr 6 15:32:33 CDT 2008


On Apr 6, 2008, at 3:50 PM, Joshua Redstone wrote:
> I finally got Octave to compile on my mac!
> So I instrumented __qp__.cc and have narrowed it down to the  
> following so far:
> There a blurb of code around line 400:
>                           double alpha_tmp = (bin(i) - res) / tmp;
>                           if (alpha_tmp < alpha)
>                             {
>                               alpha = alpha_tmp;
>                               is_block = i;
>                             }
>
> I put a printf around the computation of alpha_tmp, and around  
> algorithm iteration 168 and at loop iteration i=61:
> bin(i) = 0.000000, res=-0.731546, tmp=-0.000000
> and alpha = alpha_tmp sets alpha to:
>     alpha=-10542688472441812.000000
> This is used in the update of x, which results in an "infeasible"  
> value for x.  Things go downhill from there.
> so it looks like 'tmp' is getting set to a value that's too small.
>
> Next step is to put more printfs and see why tmp is set weird.  I  
> gotta sign off till later today/tmrw, but perhaps this helps?
> Josh

hmmm ... from the release-3-0-x archive, I have __qp__.cc:414-423  as  
being

		      if (tmp < 0.0)
		        {
			  double alpha_tmp = (bin(i) - res) / tmp;

			  if (alpha_tmp < alpha)
			    {
			      alpha = alpha_tmp;
			      is_block = i;
			    }
			}

Perhaps a better choice would be "tmp < -eps"?

Ben


More information about the Bug-octave mailing list