octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #46330] segfault [in arrayfun?]


From: Philip Nienhuis
Subject: [Octave-bug-tracker] [bug #46330] segfault [in arrayfun?]
Date: Fri, 30 Oct 2015 08:31:54 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0 SeaMonkey/2.38

Update of bug #46330 (project octave):

                  Status:                    None => Confirmed              
                 Release:                   3.8.2 => dev                    
        Operating System:                  Mac OS => Any                    
                 Summary:    segfault in arrayfun => segfault [in arrayfun?]

    _______________________________________________________

Follow-up Comment #1:

The crash occurs also on Windows with Octave-4.1.0+, so I provisionally
changed OS->Any, Release->dev.

But....
It's the statement "w = Inf" that makes the difference. Are you sure that it
Inf is a proper value?
Substituting a large number (e.g., 1e16), make the script run:

>> w = 1e16
w =   1.0000e+016
>> s = i * w;
>> H = arrayfun (@(x) c/(x*e - a)*b + d, s, "uniformoutput", false)
H =
{
  [1,1] =

    6.4950e-035 - 1.6023e-017i  3.3283e-035 - 2.1118e-019i
    -9.1736e-034 - 6.2879e-050i  7.5283e-033 + 6.9897e-049i

}
>>


so all in all very small output numbers.
These get a little bigger when substituting 1e10 or 1e5 for w, so I suppose
you'd expect H{1} to become a zero matrix?

Pulling the equation out of arrayfun(), it turns out that Octave-4.1.0+ on
Windows also crashes on:

c/(i*Inf*e - a)*b

Narrowing further,

(i*Inf.e) - a   =>  OK

c / (i*Inf*e)   =>  OK

c / (i*Inf*e - a)  => crash

so it doesn't look like an arrayfun() problem per se, but more a problem with
manipulation of matrices containing Infs and Nans.

Title adapted a little, I don't know how to put it exactly.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?46330>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]