On Thu, Aug 11, 2022 at 03:13:23PM +0000, Thierry wrote:
> Hi,
> 
> On Thu, Aug 11, 2022 at 03:56:00PM +0200, Ralf Hemmecke wrote:
> > Am I doing something wrong? I would have expected the last line to return
> > False.
> > 
> > ┌────────────────────────────────────────────────────────────────────┐
> > │ SageMath version 9.6, Release Date: 2022-05-15                     │
> > │ Using Python 3.10.4. Type "help()" for help.                       │
> > └────────────────────────────────────────────────────────────────────┘
> > sage: hr=(x^2+2*x+1)
> > sage: hl=(x+1)^2
> > sage: bool(hl==hr)
> > True
> > sage: bool(hl!=hr)
> > True
> 
> This is definitely a bug. Note that 
> 
> sage: a = hl != hr
> sage: bool(a)
> True
> 
> but
> 
> sage: bool(a.expand())
> False
> 
> This is due to the fact that there is a call to is_trivial_zero instead
> of is_zero somewhere in the __bool__ method for symbolic expressions.
> 
> Let me open a ticket and push a branch.

It is https://trac.sagemath.org/ticket/34341

Ciao,
Thierry

> 
> Ciao,
> Thierry
> 
> 
> > 
> > -- 
> > You received this message because you are subscribed to the Google Groups 
> > "sage-devel" group.
> > To unsubscribe from this group and stop receiving emails from it, send an 
> > email to sage-devel+unsubscr...@googlegroups.com.
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msgid/sage-devel/c785ac0f-a58b-305e-136d-e592a7f3a298%40gmail.com.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-devel/20220811151323.GA26318%40metelu.net.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/20220811155927.GB26318%40metelu.net.

Reply via email to