sympy icon indicating copy to clipboard operation
sympy copied to clipboard

S.Zero.is_imaginary should be True?

Open skirpichev opened this issue 10 years ago • 8 comments

See discussion in #2538 starting from this and #4149.

skirpichev avatar Jun 27 '14 12:06 skirpichev

Having worked more with this I am much more in favor of making S.Zero both real and imaginary, the origin for both real and imaginary scales. Without this, (I*r).is_imaginary for var('r', real=True) has to be None...it would be nice if it were True.

smichr avatar Aug 22 '14 23:08 smichr

To summarize my opinion from the other threads, I think zero should be imaginary, first, because to me this is the natural definition mathematically, and second, because it makes more inferences possible in the assumptions system (the I*r case noted by @smichr is a great example of this).

asmeurer avatar Aug 23 '14 01:08 asmeurer

I think we can remove the "needs decision" label. This looks like we've already decided this should be fixed. I've tried, but quickly ran into import issues, so I think I'll leave it for the veterans.

pelegm avatar Jan 02 '15 08:01 pelegm

I think we can remove the "needs decision" label.

I think so. For reference, see #8134.

skirpichev avatar Jan 02 '15 21:01 skirpichev

Did we agree on both real and imaginary?

debugger22 avatar Mar 23 '15 22:03 debugger22

I think it was pretty well agreed that zero should be imaginary (but this was never implemented IIRC). It should not be difficult to fix (much easier than changing the behavior of oo.is_real). I would start with fixing it, so you can get an idea of how the old assumptions work.

asmeurer avatar Mar 23 '15 22:03 asmeurer

Thanks! I think Sergey has already fixed it in his fork of sympy.

debugger22 avatar Mar 23 '15 22:03 debugger22

Hi, this issue is still not resolved. @skirpichev are you still working on this? I would like to work on this if you're not

AnishShah avatar Mar 13 '16 13:03 AnishShah