OK. Thanks.

On Monday, November 9, 2015 at 12:42:51 PM UTC+2, Mateusz Paprocki wrote:
>
> Hi, 
>
> On 9 November 2015 at 09:49, Paul Royik <distan...@gmail.com <javascript:>> 
> wrote: 
> > In Mul class I see this piece of code: 
> > 
> >     def _eval_is_real(self): 
> >         real = True 
> >         zero = one_neither = False 
> > 
> >         for t in self.args: 
> >             if not t.is_complex: 
> >                 return t.is_complex 
> > 
> > 
> > Don't understand last two lines. How is it possible that if t is not 
> > complex, then return that all Mul is not real? 
>
> I think this is because t.is_real implies t.is_complex, so saying 
> t.is_complex == False doesn't mean t.is_real == True; it means that t 
> is perhaps not a number (e.g. a MatrixExpr). As we employ three-valued 
> logic (yes, no, don't know), then returning t.is_complex is the 
> correct approach. Also see [1], because this code was originally wrong 
> (perhaps Chris can give you better explanation). 
>
> [1] 
> https://github.com/sympy/sympy/commit/4d9c756d031e3965867701a65d3970a915495944
>  
>
> Mateusz 
>
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "sympy" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to sympy+un...@googlegroups.com <javascript:>. 
> > To post to this group, send email to sy...@googlegroups.com 
> <javascript:>. 
> > Visit this group at http://groups.google.com/group/sympy. 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/sympy/cbc7af32-9220-4351-9035-03eeac60a6a2%40googlegroups.com.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/26575d8f-66c9-4171-8031-2d5fc940c6f1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to