octave-maintainers
[Top][All Lists]
Advanced

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

Re: No isimag() curioso


From: Michael D Godfrey
Subject: Re: No isimag() curioso
Date: Sat, 08 Sep 2012 21:52:21 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0

On 09/08/2012 05:33 PM, Daniel J Sebald wrote:
How do others feel about deprecating "iscomplex()" if it simply is the complement of "isreal()"?

I would be open to an "iscomplex" and "isimag" that have a more "class-related" behavior as I pondered above.  I don't think that would go against compatibility.

I'm also wondering if it might be worth writing in the documentation for isreal() that "isreal(x) is not the same as all(imag(x)==0)".

Dan
Dan,

Just a brief answer to all you comments.  It seems to me that the current state has just
evolved from various forces.  It is not either consistent nor likely to be clear to most
users.  Maybe its only good feature is that it is not obviously in direct conflict with Matlab.
However, I think that any single change, without carefully thinking through all the issues,
is likely to do as much harm as good.

One thing that you said should be followed up: a clearer description of the current state
should go somewhere in the Manual.

And, this may just add to the noise, but a few days ago I created a vector which was composed
of complex elements, and some "real" elements, i.e. isreal(x(4)) said 1 and whos x(4) said
it was only 8 bytes.  But, the vector was complex and whos x  showed it as composed of 16 byte
complex elements.  Just another bit of schizophrenia.   Since I have not been able to
reproduce this I have not been able to try it on Matlab.

I do think that creating an isimag() and at least deprecating iscomplex() is a good idea.

However, someone with at least a day or two of time should go through this carefully and propose
a good set of actions.

Michael


reply via email to

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